List of Indexed Accessor Names for NSMutableArray
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