On Jul 30, 2006, at 5:42 PM, Lennox Jacob wrote:

Hello,
I have a Pushbutton named Export, which,when clicked, I would like it to export data (EF1.text, EF2.text, EF3.text, EF4.text) from some chosen editfields (EF1, EF2, EF3, EF4) to a new text file on the desktop.
Not Save or SaveAs like when the whole document is saved.
How is that done?

Assuming these are single line editfields and that an EndOfLine separator is adequate:

  Dim f As FolderItem
  Dim tOS As TextOutputStream

  f=DesktopFolder.Child("[your file name here]")
  tOS=f.CreateTextFile
  tOS.WriteLine EF1.Text
  tOS.WriteLine EF2.Text
  tOS.WriteLine EF3.Text
  tOS.WriteLine EF4.Text
  tOS.Close


To read this back into the editfields:

  Dim f As FolderItem
  Dim tIS As TextInputStream

  f=DesktopFolder.Child("[your file name here]")
  tIS=f.OpenAsTextFile
  EF1.Text=tIS.ReadLine
  EF2.Text=tIS.ReadLine
  EF3.Text=tIS.ReadLine
  EF4.Text=tIS.ReadLine
  tIS.Close

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>

Reply via email to