Re: Reading and writing records
Re: Reading and writing records
- Subject: Re: Reading and writing records
- From: has <email@hidden>
- Date: Fri, 24 Aug 2007 16:35:48 +0100
Chris wrote:
I know how to read and write a list of records to a file using the "as
list" qualifier.
[...]
Does anyone have a code snippet for writing a list of records one
at a time and reading them back one at a time until eof?
You don't. You slurp the whole list into memory and work on it there.
(This is not to say it's impossible, just a very bad idea.)
A more useful question would be: what are you trying to achieve (i.e.
what's the script's purpose)? e.g. If you're needing a persistent,
filesystem-based data store that allows random access, then using
Standard Additions to read and write serialised AppleScript data
structures is really the wrong tool for the job and there are much
more appropriate solutions that you should look into (plain text
files, XMLLib.osax, System Events' Plist Suite, Database Events,
FileMaker Pro, PostgreSQL, etc.).
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden