RE: Using NSArchiver with NSDocument follow-up
RE: Using NSArchiver with NSDocument follow-up
- Subject: RE: Using NSArchiver with NSDocument follow-up
- From: Weeks Family <email@hidden>
- Date: Sun, 21 Sep 2003 17:00:53 -0400
I've got two responses to my original post. Thanks.
So I understand now that NSDocument subclasses should not implement the
the NSCoding protocol. I changed my doc subclass so that a
NSMutableArray holds all the data. And I removed the initWithCoder,
encodeWithCoder methods from my doc subclass. Now the doc subclass
dataRepresentationOfType invokes archivedDataWithRootObject with the
mutable array. I can save and open files now.
The encodeWithCoder still gets called twice for each of the objects in
the mutable array. I do not understand this. The initWithCoder gets
called once, this sounds correct.
Can anyone explain this?
Thanks.
John Weeks
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.