KVC indexed accessors in Java
KVC indexed accessors in Java
- Subject: KVC indexed accessors in Java
- From: Paul Szego <email@hidden>
- Date: Wed, 23 Jun 2004 10:55:51 +1000
I'm trying to implement the alternate form accessors for a to-many
property in Java, and not having much luck. As per this doc I've got
the "get" side of it working:
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/AccessorConventions.html
...but I can't seem to make the "set" half of the world work. From the
reference above, the examples given for a property named "transaction"
look like this in ObjC:
- (void)insertObject:(Transaction *)transaction
inTransactionsAtIndex:(unsigned int)index {
// implementation specific code
return;
}
- (void)removeObjectFromTransactionsAtIndex:(unsigned int)index {
// implementation specific code
return;
}
What should they look like in Java? I've tried the following, plus
several variations, but to no avail. I get one of those useless "this
class is not key value coding-compliant" messages. What am I doing
wrong?
public void insertObjectInTransactionsAtIndex( Transaction t, int index
);
public void removeObjectFromTransactionsAtIndex( int index );
Thanks,
Paul.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.