• 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
NSDictionary key types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDictionary key types


  • Subject: NSDictionary key types
  • From: Jon Sigman <email@hidden>
  • Date: Thu, 6 Jan 2011 12:10:07 -0800 (PST)

I'm a bit new to Cocoa, and I'm trying to get my head around NSDictionary. In
the Apple documentation it says, "Each entry consists of one object that
represents the key and a second object that is the key's value. ... In general,
a key can be any object, but note that when using key-value coding the key must
be a string."

So, I supply an object that *represents* the key, meaning that this object
itself is not the key, but it's value is? That makes sense for NSStrings, but
not if the key is some other object without an obvious "value", like an NSArray.
Are the two key types somehow treated differently?




_______________________________________________

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

  • Follow-Ups:
    • Re: NSDictionary key types
      • From: David Duncan <email@hidden>
    • Re: NSDictionary key types
      • From: Quincey Morris <email@hidden>
    • Re: NSDictionary key types
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: How to get "colored" font smoothing in a CALayer
  • Next by Date: Re: Context in GCD source cancel handler?
  • Previous by thread: Re: How to get "colored" font smoothing in a CALayer
  • Next by thread: Re: NSDictionary key types
  • Index(es):
    • Date
    • Thread