On Jan 9, 2005, at 7:13 AM, Joshua Coventry wrote:
nobody ...?
---------------------------
Joshua Coventry
On 8 Jan 2005, at 19:22, Joshua Coventry wrote:
Hello everybody,
I'm trying to save the contents of 3 listboxes (2 with 2 columns, and
1 with 4 columns). I want to save them into a custom file which will
only open in my program(so, a specific creator type code).
I'll also need to load these custom files as well, into a new window
Joshua,
I'll give it a try. Take a look at the TextInputStream Class in the
Language Reference. There is an example that demonstrates how to read
in data from a FolderItem object (file) with code to parse the text
into rows and fields for display in a Listbox. The TextOutputStream is
a class that provides the ability to write to file.
That may give you a start on that part of your question. Once you have
a project that will read and write from a file that has a static number
of columns, using a Listbox for display and editing, then some ideas
for adjusting to different numbers of fields in a row will develop.
Maybe develop a separate project to save the contents of an Editfield
into a file and then open a new window and load this data in an
Editfield in that new window, which could provide simple template to
incorporate into the main project.
Depending on the amount of data to be read in and out, you should also
look at the BinaryStream class. It reads and writes data from any
position in the file, not just sequentially. Also much faster.
Craig
_______________________________________________
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>
|