I got Save working but I can't seem to get Open working

This is save
  dim f as folderItem
  dim i as integer
  dim t as textOutputStream
  dim theLine as string

  f = GetSaveFolderItem ("", "URL Database")
  if f <> nil then
    t = f.createTextFile
    if t <> nil then
for i = 0 to urlsv.listCount -1 //repeat with each row of the listbox
        theLine = urlsv.cell(i,0) + chr(9) + urlsv.cell(i,1)
        //theLine is made up of the Name + tab character + the URL
        t.writeLine theLine
      next
      t.close
    end if
  end if


This is open
  progresswheel1.visible=true
  dim file as folderitem
  Dim stream as TextInputStream
  dim input as string
  file = GetOpenFolderItem("TEXT") // TEXT is the file type you want to
  //open. It must be specified in the editor.

  if not UserCancelled and (file <> Nil) then
    stream = file.OpenAsTextFile
  else
    msgBox "Error"
    Return
  end if

  if stream = Nil then
    msgbox "File could not be opened."
    Return
  end if

  input = stream.ReadLine
  window1.urlsv.text = input
  stream.close
_______________________________________________
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