Skip navigation.
 
mlRe: List of Indexed Accessor Names for NSMutableArray
FROM : Kyle Sluder
DATE : Sat Jun 28 22:03:53 2008

On Sat, Jun 28, 2008 at 3:56 PM, Markus Spoettl
<<email_removed>> 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

Related mailsAuthorDate
mlList of Indexed Accessor Names for NSMutableArray Markus Spoettl Jun 28, 21:56
mlRe: List of Indexed Accessor Names for NSMutableArray Kyle Sluder Jun 28, 22:03
mlRe: List of Indexed Accessor Names for NSMutableArray Markus Spoettl Jun 29, 00:53
mlRe: List of Indexed Accessor Names for NSMutableArray Keary Suska Jun 29, 01:02
mlRe: List of Indexed Accessor Names for NSMutableArray Clark Cox Jun 29, 01:06
mlRe: List of Indexed Accessor Names for NSMutableArray Markus Spoettl Jun 29, 01:38
mlRe: List of Indexed Accessor Names for NSMutableArray Quincey Morris Jun 29, 02:07
mlRe: List of Indexed Accessor Names for NSMutableArray Markus Spoettl Jun 29, 02:36