• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List of Indexed Accessor Names for NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: List of Indexed Accessor Names for NSMutableArray
      • From: Markus Spoettl <email@hidden>
References: 
 >List of Indexed Accessor Names for NSMutableArray (From: Markus Spoettl <email@hidden>)

  • Prev by Date: List of Indexed Accessor Names for NSMutableArray
  • Next by Date: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject
  • Previous by thread: List of Indexed Accessor Names for NSMutableArray
  • Next by thread: Re: List of Indexed Accessor Names for NSMutableArray
  • Index(es):
    • Date
    • Thread