On 2006-12-12, at 19:38, Ed Harris wrote:
I am running into a problem that has been discussed occasionally
over the
past 6 years, but I can't find a definite solution. It concerns the
"createtextfile" method sometimes returning a NIL object. This occurs
primarily on Mac OS X 10.3.
The code is essentially:
Dim fi as FolderItem
Dim tos as TextOutputStream
fi = GetFolderItem("Temp.html")
tos = fi.CreateTextFile
tos.write "This is a test"
tos.close
It seems to almost always work on OS X 10.4, by the way, and always
works on
a Windows machine.
Additional information: the file "Temp.html" exists and I am
expecting it to
be overridden. Also, I have added "errNr = fi.LastErrorCode" after
the
GetFolderItem line. When the CreateTextFile method fails and
returns NIL,
the value of errNr is 104.
Any ideas on what is going on and how to fix it?
Thanks,
Ed
I have had a lot of this problem, I have to rename the old file and
then handle it as a TMP file, and delete it when I launch my app next
time. It looks to be impossible to delete the file, your app have to
be closed and re launched ..
Thats the workaround i found ...
Sven E
_______________________________________________
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>