Re: [Q] Will the be any problem in implementing an NSArray method using fast enumeration?
Re: [Q] Will the be any problem in implementing an NSArray method using fast enumeration?
- Subject: Re: [Q] Will the be any problem in implementing an NSArray method using fast enumeration?
- From: Gregory Weston <email@hidden>
- Date: Fri, 01 Jul 2011 07:59:53 -0400
Dave DeLong wrote:
> You can just do:
>
> NSArray *objectsArray = [theArray valueForKey:key];
>
> And it'll do pretty much the same thing (except that it'll call -valueForKey: on each item in the array, and not objectForKey:. However, if the objects are NSDictionaries, that's pretty much the same thing).
Pretty much. But just this week I ran across a situation where sending objectForKey: worked while valueForKey: said the dictionary wasn't KVC-compliant for the specified key.
_______________________________________________
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