Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: What's the difference?




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >RS: What's the difference? (From: Roland Silver <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.