Hi,

I have this in my program's main window called viewer:

  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
    preferences.close
  else
    dim t1 as textoutputstream
    file = PreferencesFolder.child("SpiderWeb 2006 Preferences")
    if file<> nil then
      Dim fileStream As TextOutputStream
      //file= GetSaveFolderItem("application/text","My Info")
      t1=file.CreateTextFile

      t1.WriteLine preferences.homepage.text
      t1.WriteLine preferences.welcome.text
      t1.Close
      preferences.close
    end if
    preferences.close

  end if

 and this 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

 But I still get a NilObjectException on these  lines:
t1 = t.readline
t2 = t.readline

Can someone help me I can't figure out what is wrong
Terry told me it sounded like the folderitem I am trying to open does not exist

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