OK Charles,

Just to let you know, when I use 
>> dim t as TextOutputStream = f.AppendToTextFile
everytime I click on the PushButton it appends the file with whatever are in 
the editfields, that was not what I wanted, so I changed it to
>> dim t as TextOutputStream = f.CreateTextFile
and that works great.
Thanks again.
Lennox



>> Great Charles.
>> Thanks, I tried it and has replaced what I had.

>> Thanks again
>>
>> Lennox
>>
>> Only if you're lucky.  Here is some code that doesn't depend on luck.
>>
>> dim f as FolderItem = DesktopFolder.Child("foo")
>> If f is nil then //something went wrong
>>    Return
>> End if
>>
>> dim t as TextOutputStream = f.AppendToTextFile
>> If t is nil then
>>    //check f.LastErrorCode
>>    Return
>> End if
>> t.WriteLine "foo"
>> t.WriteLine "foo"
>> t = nil //the file is closed when the object is destroyed
>>
>> FolderItem.AppendToTextFile creates the file if one does not already
>> exist; presumably CreateTextFile fails if the file already exists.
>>
>> Charles Yeomans

                
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
_______________________________________________
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