realbasic-nug
[Top] [All Lists]

Re: [Win32] FolderItem is Valid, TextInputStream is Nil

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: [Win32] FolderItem is Valid, TextInputStream is Nil
From: David Glass <dglass at graymattercomputing dot com>
Date: Thu, 31 Aug 2006 07:35:54 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <8B7AAEB3-BB31-451F-98B1-814CB72B14B3 at graymattercomputing dot com> <44F6D9C6 dot 3020601 at celticwolf dot com>

On Aug 31, 2006, at 05:44, Charles Calvert wrote:


tisFileContents = filUpdateFile.ReadAll

gives me a valid stream. No matter how many items are in the directory,
the last one always nils out.

Have you tried checking filUpdateFile.Length before opening it?

No, I haven't. I can though. What will having this information do for me? I can watch the destination folder during the FTP process and see the files show up and see that they have non-zero sizes.



I suppose it is possible that the last file isn't completely present,

Are you in control of the FTP process?  If so, why not use interthread
or interprocess communication to have the FTP process notify the file
processing code when the file is ready?


I'm not sure what 'in control' means. My application handles the FTP transfer (using FTPSuite) so I think the answer to that is 'Yes'. However, the files are not processed as they are retrieved, rather, all the files are retrieved, then when that is done, the files are processed.

So my process is not:

1. Download a file
2. Process a file
3. Repeat steps 1 and 2 until done

Rather it is

1. Download a file
2. Repeat step 1 until all files downloaded
3. Process a file
4. Repeat step 3 until all files processed

Given that all the FTP activity has completed I don't think there would be anything for the FTP process/thread to report. It doesn't move on to the processing stage until it has retrieved all the files. Perhaps I don't understand your suggestion?

Is it possible that all FTP activity *hasn't* completed when the application runs on WinXP, but *has* on OS X?

--
David Glass - Gray Matter Computing
graymattercomputing.com - corepos.com
559-303-4915

Apple Certified Help Desk Specialist

_______________________________________________
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>