• 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
List of Indexed Accessor Names for NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

List of Indexed Accessor Names for NSMutableArray


  • Subject: List of Indexed Accessor Names for NSMutableArray
  • From: Markus Spoettl <email@hidden>
  • Date: Sat, 28 Jun 2008 12:56:29 -0700

Hello List,

is there a complete list of indexed accessor names that can be implemented? The KVC guides just mentions the basic ones

- (NSUInteger)countOf<key>
- (id)objectIn<key>AtIndex:(unsigned)theIndex
- (void)get<key>:(id *)objsPtr range:(NSRange)range
- (void)insertObject:(id)obj in<key>AtIndex:(NSUInteger)theIndex
- (void)removeObjectFrom<key>AtIndex:(NSUInteger)theIndex
- (void)replaceObjectIn<key>AtIndex:(NSUInteger)theIndex withObject: (id)obj


I had this in my code

- (void)remove<key>AtIndexes:(NSIndexSet *)indexes
{
    NSMutableArray *kva = [self mutableArrayValueForKey:@"<key>"];
    [kva removeObjectsAtIndexes:indexes];
}

which caused an endless recursion because [kva removeObjectsAtIndexes:] assumes that remove<Key>AtIndexes: is the KVC implementation for it. Of course it was not. I can't find any mention in the documentation about this accessor name.

So, is there complete list of method names or is it just all NSMutableArray methods that contain "Objects" in their name with "Objects" replaced by "<key>" ?

Regards
Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: "Kyle Sluder" <email@hidden>
  • Prev by Date: setAccessoryView question
  • Next by Date: Re: List of Indexed Accessor Names for NSMutableArray
  • Previous by thread: setAccessoryView question
  • Next by thread: Re: List of Indexed Accessor Names for NSMutableArray
  • Index(es):
    • Date
    • Thread