Re: Class-Within-Class and Archiving
Re: Class-Within-Class and Archiving
- Subject: Re: Class-Within-Class and Archiving
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 5 Sep 2005 15:10:32 -0700
On Sep 5, 2005, at 1:55 PM, James Gifford wrote:
I've made a custom class called "Book" and it contains a few simple
NSString variables for title, author, publisher, and such. It also
contains an array which is filled with another custom class called
"Character." The "Character" custom class has simple NSString
variables for name, age, role and so on. Before I added the array
of "Character" objects to my "Book" class, I could simply use
NSArchiver to save the data to a file. Now, with each "Book"
object containing some "Character" objects, NSArchiver won't work.
Both methods conform to NSCoding and separately they can be
NSArchived just fine. But when one class contains objects of the
other class, NSArchiving falls apart.
NSArchiving is easily capable of dealing with this. In what sense
does it "fall apart", and how have you implemented your NSCoding
methods?
mmalc
_______________________________________________
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