• 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: coding NSNumber in NSArray?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >coding NSNumber in NSArray? (From: jon <email@hidden>)

  • Prev by Date: Re: Text Searching system...
  • Next by Date: Re: Need Help : Iphone Dynamic behavior Tab Controller!
  • Previous by thread: Re: coding NSNumber in NSArray?
  • Next by thread: Re: coding NSNumber in NSArray?
  • Index(es):
    • Date
    • Thread