realbasic-nug
[Top] [All Lists]

Re: FolderItem weirdness

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: FolderItem weirdness
From: "Stephen E. Hutson" <mail_lists at adpartnership dot net>
Date: Thu, 30 Mar 2006 16:31:37 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <fed2e2560603300841i4e3860c1s8c3bcb6b123aadff at mail dot gmail dot com> <F007A71E-FC6C-4832-8AAE-92DC52AD9162 at frontiernet dot net> <fed2e2560603301326g2f79da56p6d06ffe9d7a9df15 at mail dot gmail dot com> <a06200769c052038a037e at [10 dot 0 dot 1 dot 2]> <410C8EAD-1867-42DF-9D40-F3EC2F86BFBF at frontiernet dot net>
I found a similar situation with a small temporary file that I was creating, then checking "too quickly."

My solution was just to insert a quick while...wend loop (in the main RB thread), checking for the length of the file to be greater than zero, exiting when I could "see" that the file had a non-zero length. I built a timeout of a second or so into the loop, and it has worked well for me.

Sometimes the file "shows up" after a couple of ticks, and sometimes it takes about 30 ticks, but it's always recognized this way.

Steve

====================================================
==  Stephen E. Hutson, AquilaDigital Partnership  ==
==          http://www.adpartnership.net          ==
====================================================


On Mar 30, 2006, at 4:26 p.m., Harrie Westphal wrote:


On Mar 30, 2006, at 3:53 PM, Joseph J. Strout wrote:

I guess I just prefer threads for long operations.

Well, in my case these are very small files being copied but on occasion, the file being copied will be unavailable if the program tries to re-access it too quickly. It doesn't happen often, but now and then it is a gotcha that must be coded for.


=== A Mac addict in Tennessee ===

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>