On 3-May-07, at 4:03 PM, Sven E Olsson wrote:
>
> Just a note about Close .. This works in 2007 R1 and R2
>
> dim f as FolderItem = DesktopFolder.child("test.txt")
> dim WriteToFile as TextOutputStream
> dim s as string = "helloĆ"
>
> if f <> nil then
> WriteToFile = f.CreateTextFile
> if WriteToFile <> nil then
> WriteToFile.Write( s )
> WriteToFile.Close
> WriteToFile.Write("HJJJA")<<<-- not written
> else
> MsgBox("error!")
> end if
> end if ' nil
>
>
> But there is perhaps other reasons to not use it, this was only a
> test..
As the one bug report you pointed out makes note of writing AFTER he
lose gets NO error but should
If you set WriteToFile to NIL instead of closing it then you'd get an
exception which is closer to what should happen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>