Re: Property List Question
Re: Property List Question
- Subject: Re: Property List Question
- From: "R. Tony Goold" <email@hidden>
- Date: Wed, 16 May 2001 02:40:05 -0400
The property list methods allow storage of NSData objects, right? If so,
you could try using NSArchiver's archivedDataWithRootObject: method to
serialise the object into an NSData object, which you could then store in
the array.
I've never tried this myself, so you may want to double-check this before
adopting it as your solution, but I think it's a step in the right
direction.
Tony
On Tuesday, May 15, 2001, at 10:30 , Karl Goiser wrote:
Hello,
I have a question about property lists:
I have data which is a list of information about objects that I want to
store in a property list - it is basically like a list of information
about people.
So I want to represent it as an array of arrays of strings. This way, I
can easily read and store the data with methods like
"arrayWithContentsOfFile:" and "writeToFile:atomically:".
The problem is is that I want to represent the 'people' as objects (for
the obvious OO benefits). However, if I do, I will lose the ability to
use "arrayWithContentsOfFile:" and "writeToFile:atomically:" because the
array will no longer contain only property list objects.
Is there a protocol or something which I can make the 'people' objects
conform to which will make the saving and loading work?
Thanks in advance,
Karl
-- ----
Klaatu verada nikto
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev