I have a container class which has a mutable array.
To allow it to be KVC/KVO compliant, I'm implementing:
- (void) setObjects:(NSArray*) objs;
// KVC/KVO compliant
- (NSArray*) objects;
// KVC/KVO compliant
- (int) countOfObjects;
// KVC/KVO compliant
- (thing*) objectInObjectsAtIndex:(int) index;
// KVC/KVO compliant
- (void) insertObject:(thing*) obj inObjectsAtIndex:(int) index; //
KVC/KVO compliant
- (void) removeObjectFromObjectsAtIndex:(int) index; // KVC/KVO
compliant
- (void) replaceObjectInObjectsAtIndex:(int) index withObject:(thing*)
obj; // KVC/KVO compliant
I also have a number of methods that allow "things" to be added from
arrays, or indexed by an index set. Is there a way to make these KVC/
KVO compliant or would they all
have to call through to one or more of these methods to ensure that?
For example:
- (void) addObjectsFromArray:(NSArray*) objs atIndexes:(NSIndexSet*)
set;
- (void) removeObjectsInArray:(NSArray*) objs;
- (void) removeObjectsAtIndexes:(NSIndexSet*) set;
tia,
Graham
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]