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:23:18 -0700
On Sep 14, 2009, at 9:11 AM, jon wrote:
I thought i had read that NSNumber knew how to code itself in an
NSArray... is this not the case? or is this code below just set up
all wrong? and what would the proper way be to set this up?
The code looks OK to me. Have you single-stepped through the init and
encode methods to look at what's actually happening? In particular, do
valueForKey and setValueForKey work as you expect?
(FYI, your typeOfLeaf property can just be a raw integer, it doesn't
have to be an NSNumber. The KV-coding takes care of wrapping them in
NSNumbers.)
—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