Additional information:

Retrying the CreateTextFile method after a delay doesn't help.  It looks
like once I do the fi = getfolderitem("temp.html") statement at the "wrong"
time there doesn't seem to be a way to delete the file, create the text
file, etc.  So the question may be how can I tell when it is "safe" to do
the get folderitem method.

Ed

-----Original Message-----
From: Ed Harris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 12, 2006 2:25 PM
To: 'REALbasic NUG'
Subject: RE: CreateTextFile Failure Problem

I have been trying various things - so far with no success.  The issue
appears to be more complex than I thought.  The application displays html
documents sequentially when the user clicks a "Next" button.  When the
button is clicked, the application grabs the next html document, writes it
to the Temp.html file, then displays it in an html viewer control.

The problem arises if the user clicks the "Next" button quickly (on a slow
machine), in which case the application tries to display the next document.
It may be that the html viewer control is still in the process of displaying
the document at the same time the code is trying to write the next html
file.  I am trying a number of things, including disallowing the "next"
button to be clicked until the html DocumentComplete event fires, but so far
no good.

At the point that the CreateTextFile method returns a nil value, the folder
item does not show as locked and read and write are both enabled, so I am
not sure why the file is considered locked.

Ed

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 12, 2006 2:09 PM
To: [email protected]
Subject: Re: CreateTextFile Failure Problem

On Dec 12, 2006, at 20:05 UTC, Sven E Olsson wrote:

> > Then close the file. Then you can delete it.
> 
> The file is closed, at least is the RB command used to do it...

I agree with Peter -- it sounds like you've got the file still held
open somehow.  Perhaps you have more than one reference to it, and
you've closed one but not the other.  FWIW, I use CreateTextFile all
the time and have never had any problems with it (except when the file
is already open, as described).

Best,
- Joe


--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

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




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

Reply via email to