ok so here is my code that writes a preference file it is in the Save
button in my preferences window:
dim file as folderitem
dim t as textoutputstream
file = PreferencesFolder.child("SpiderWeb 2006 Preferences")
if file<> nil then
Dim fileStream As TextOutputStream
//file= GetSaveFolderItem("application/text","My Info")
t=file.CreateTextFile
t.WriteLine homepage.text
t.WriteLine welcome.text
t.Close
end if
Here is the open code to open the preferences file that is in my
main window
dim file as folderitem
dim t as textinputstream
file = preferencesfolder.child("SpiderWeb 2006 Preferences")
if file<> nil then
t=file.OpenAsTextFile
'preferences.homepage.text= t.readline
'preferences.welcome.text = t.readline
t.close
end if
which I get a nilobjectexception on t.Close
On Jan 25, 2006, at 7:04 PM, Terry Ford wrote:
On 25-Jan-06, at 2:22 PM, Brian Heibert wrote:
I am trying to read my preference file
dim file as folderitem
dim t as textinputstream
file = PreferencesFolder.child("SpiderWeb 2006 Preferences")
if file<> nil then
t=file.OpenAsTextFile
preferences.homepage.text = t.readline
preferences.welcome.text = t.readline
t.close
end if
I am getting a NilObjectException on:
preferences.homepage.text = t.readline
preferences.welcome.text = t.readline
This usually means that the folderitem you are attempting to open
does not exist.
Terry
_______________________________________________
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>