• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get objects to not be encoded with NSArchiver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Re: How to get objects to not be encoded with NSArchiver (From: Chris Kane <email@hidden>)

  • Prev by Date: NSOutlineView with icons
  • Next by Date: Re: Private, Protected methods in Obj C?
  • Previous by thread: Re: How to get objects to not be encoded with NSArchiver
  • Next by thread: Malloc()
  • Index(es):
    • Date
    • Thread