Re: how to build data parser
Re: how to build data parser
- Subject: Re: how to build data parser
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 27 Mar 2005 08:46:26 +0200
At 17:27 Uhr -1000 26.03.2005, Daniel Child wrote:
The parse file method would return an array of objects. I'm stuck
with two things I haven't done before. How do I specify an object
type (e.g. Word class or Stroke class object)? And once I have
scanned individual lines of text, how can assign the parsed fields
to the correct member variable fields of the object class being
passed in?
Are you aware that Cocoa has finished classes for archiving and
unarchiving objects? NSArchiver and NSUnarchiver (and its keyed
variants, which are more convenient and flexible) can be used to
read/write an entire object hierarchy rooted in one object (which
could even be an NSArray or NSDictionary).
You can archive/unarchive as XML if you want, or in Apple's own binary format.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden