• 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: RS: What's the difference?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: What's the difference?


  • Subject: Re: RS: What's the difference?
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 28 May 2007 07:42:08 -0700


On May 28, 2007, at 7:04 AM, Roland Silver wrote:

What's the difference between the two NSDictionary methods valueForKey and objectForKey?

-[NSDictionary objectForKey:] is the primary way to fetch an object from an NSDictionary.


-[NSDictionary valueForKey:] implements KVC support for dictionaries (part of the NSKeyValueCoding informal protocol).

The docs outline the difference between the two (see the discussion section of valueForKey:). In general you would use objectForKey:.

-Shawn

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: RS: What's the difference?
      • From: Alastair Houghton <email@hidden>
References: 
 >RS: What's the difference? (From: Roland Silver <email@hidden>)

  • Prev by Date: RS: What's the difference?
  • Next by Date: observing dealloc
  • Previous by thread: RS: What's the difference?
  • Next by thread: Re: RS: What's the difference?
  • Index(es):
    • Date
    • Thread