Hi all,
here's a small snippet I used to save text from EditField and get it back.
Until I type some comments - using ASCII > 127 characters - in my html
files I wasn't able to see the trouble.
Basically, what must I change there ?
(of course, I want the styles I put in the text)
Emile
a. Read a text file
----------------
// Open the text file in an EditField
//
Dim f As FolderItem
// Ask the user to choose a text file
f = GetOpenFolderItem("application/text")
If f = Nil Then
Return
End If
// Open the text file and put its contents into the EditField
f.OpenStyledEditField wMain.EFSource
b. Write a text file
-----------------
// Save the EditField in a text file
//
Dim f As FolderItem
// Ask the user to choose a destination text file
f = GetSaveFolderItem("application/text","Default.html")
If f = Nil Then
Return
End If
// Open the text file and put its contents into the EditField
f.SaveStyledEditField wMain.EFSource
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.
|