• 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: Storing values in dictionary with their address as the key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Storing values in dictionary with their address as the key


  • Subject: Re: Storing values in dictionary with their address as the key
  • From: "David Wilson" <email@hidden>
  • Date: Mon, 28 Jul 2008 16:37:16 -0400

On Mon, Jul 28, 2008 at 3:52 PM, Carter R. Harrison
<email@hidden> wrote:
>
> Actually now that I'm looking at this more closely, NSDictionary is
> expecting an NSString for the key when inserting a value.  Your example uses
> an NSValue for the key - the compiler is throwing a warning for this one..

Use objectForKey and setObject:forKey: rather than the valueForKey:
and setValue:forKey: (which are really intended just for letting
NSDictionary do arbitrary key-value coding)

--
- David T. Wilson
email@hidden
_______________________________________________

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: 
 >Storing values in dictionary with their address as the key (From: "Carter R. Harrison" <email@hidden>)
 >Re: Storing values in dictionary with their address as the key (From: "David Wilson" <email@hidden>)
 >Re: Storing values in dictionary with their address as the key (From: "Carter R. Harrison" <email@hidden>)

  • Prev by Date: Re: Storing values in dictionary with their address as the key
  • Next by Date: Re: Storing values in dictionary with their address as the key
  • Previous by thread: Re: Storing values in dictionary with their address as the key
  • Next by thread: Re: Storing values in dictionary with their address as the key
  • Index(es):
    • Date
    • Thread