Re: List of Indexed Accessor Names for NSMutableArray
Re: List of Indexed Accessor Names for NSMutableArray
- Subject: Re: List of Indexed Accessor Names for NSMutableArray
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 28 Jun 2008 16:03:53 -0400
On Sat, Jun 28, 2008 at 3:56 PM, Markus Spoettl
<email@hidden> wrote:
> I had this in my code
>
> - (void)remove<key>AtIndexes:(NSIndexSet *)indexes
> {
> NSMutableArray *kva = [self mutableArrayValueForKey:@"<key>"];
> [kva removeObjectsAtIndexes:indexes];
> }
And you're surprised that this caused an infinite loop? The point of
the indexed accessors is to implement the actual data manipulation for
the proxy returned by -mutableArrayValueForKey. So all
-removeKeyAtIndexes: should do is remove the requested object from
whatever storage mechanism is being used to back that property.
--Kyle Sluder
_______________________________________________
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