• 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
KVC indexed accessors in Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Really Big Windows and Interrupting computations?
  • Next by Date: override windowControllerDidLoadNib in Java?
  • Previous by thread: Re: Black Background in an imageview?
  • Next by thread: override windowControllerDidLoadNib in Java?
  • Index(es):
    • Date
    • Thread