Brian,
You also have to define File Types and designate as Properties
MainBuffer and NameOfFile As Strings, but here's core code to Open a
text file :
Dim FileStreamA As TextInputStream
Dim FileToAccess As FolderItem
FileToAccess = GetOpenFolderItem ("Text File")
If FileToAccess <> Nil Then
NameOfFile = FileToAccess.AbsolutePath
FileStreamA = FileToAccess.OpenAsTextFile
MainBuffer = FileStreamA.ReadAll
FileStreamA.Close
Else
Return
End If
And here's core code to Save a text file:
Dim FileStreamB As TextOutputStream
Dim FileToAccess As FolderItem
FileToAccess = GetSaveFolderItem ("Text File", NameOfFile)
If FileToAccess <> Nil Then
NameOfFile = FileToAccess.Name
FileStreamB = FileToAccess.CreateTextFile
FileStreamB.Write MainBuffer
FileStreamB.Close
Else
Return
End If
That's just one approach. There are many others.
Hope that helps.
Barry Traver
_______________________________________________
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>