Re: How to get objects to not be encoded with NSArchiver
Re: How to get objects to not be encoded with NSArchiver
- Subject: Re: How to get objects to not be encoded with NSArchiver
- From: Rosyna <email@hidden>
- Date: Wed, 3 Apr 2002 01:34:29 -0700
Actually, when I tried returning nil, I got an error about unknown
class: Null. The dictionary never even got a nil to complain about.
I've complained about Nulls before ;)
Ack, at 4/2/02, Chris Kane said:
Implement -replacementObjectForCoder: in HostObject, to return an
NSObject (e.g., return [[NSObject new] autorelease]).
Nominally, you might return nil, but if you do that, since these
objects are buried in an NSDictionary, the dictionary will blow up
on unarchiving a nil object. [For advanced developers, this
previous sentence is food for thought: what _is_ the right behavior,
and whose responsibility is it to have the right behavior? I've
just come to my own conclusion; it surprises me a bit that we've
never gotten a complaint about this, that I can recall. Probably
just very uncommon.]
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
---
Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
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.