FROM : Markus Spoettl
DATE : Sat Jun 28 21:56:29 2008
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
--
DATE : Sat Jun 28 21:56:29 2008
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
--
| Related mails | Author | Date |
|---|---|---|
| Markus Spoettl | Jun 28, 21:56 | |
| Kyle Sluder | Jun 28, 22:03 | |
| Markus Spoettl | Jun 29, 00:53 | |
| Keary Suska | Jun 29, 01:02 | |
| Clark Cox | Jun 29, 01:06 | |
| Markus Spoettl | Jun 29, 01:38 | |
| Quincey Morris | Jun 29, 02:07 | |
| Markus Spoettl | Jun 29, 02:36 |






Cocoa mail archive

