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: Mike Abdullah <email@hidden>
- Date: Fri, 01 Jul 2011 13:20:42 +0100
On 1 Jul 2011, at 12:59, Gregory Weston wrote:
> 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.
I believe this would be when the key begins with an @ symbol.
_______________________________________________
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