gettingstarted
[Top] [All Lists]

(no subject)

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: (no subject)
From: Greg Olson-Hyde <isomfield at optusnet dot com dot au>
Date: Sun, 1 Aug 2004 10:48:31 +1000
Delivered-to: gettingstarted at lists dot realsoftware dot com
G'day all

Terry requested another question, so here it is  :-)

I have an EditField that I am saving to, and loading from, a text file. I have the ability to save and load 'multi lines' with carriage returns.

So far so good, all is functioning, but...

I want to save and load 'multi lines' using more than one EditField. I can see how to save many 'single line' strings to one file but how can I save many 'multi line' strings with one or many carriage returns from many EditFileds to the same text file. I will use a database if required but as there will only ever be one record this may be overkill. Does this make sense?

The code I am using to load multi line text into one EditField is below:

  Dim f As folderItem
  Dim t As textInputStream
  f = preferencesFolder.child("Notes")
  if f <> nil then
    if f.exists then
      t = f.OpenAsTextFile
      if t <> nil then
        psNotesText = t.readAll
        efMyNotes.Text = psNotesText
        t.close
      end if
    end if
  end if

RB 5.5.2, Mac OS X 10.3.4
Cheers

Greg
Sydney Australia

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>