Re: coding NSNumber in NSArray?
Re: coding NSNumber in NSArray?
- Subject: Re: coding NSNumber in NSArray?
- From: Jens Alfke <email@hidden>
- Date: Mon, 14 Sep 2009 10:38:50 -0700
On Sep 14, 2009, at 10:17 AM, Quincey Morris wrote:
Whatever your question is, the answer likely is: don't try to use
'encodeObject:forKey:' to encode NSNumber objects. Use one of the
variants like "encodeInteger:forKey:" or "encodeInt32:forKey:" --
you need to tell the archiver which *kind* of external
representation to use for the number.
That's not true. NSNumber implements NSCoding, so it's perfectly
capable of archiving and unarchiving itself. It already knows
internally what the number's representation is.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden