Re: KeyValue coding for non WO classes
Re: KeyValue coding for non WO classes
- Subject: Re: KeyValue coding for non WO classes
- From: Art Isbell <email@hidden>
- Date: Thu, 22 Dec 2005 12:43:24 -1000
On Dec 22, 2005, at 12:29 PM, Owen McKerrow wrote:
Now I've gotten so used to WO and it doing lots of the work for me,
I just tried to make a valueForKey() call on this class which of
course failed as the class doesn't know anything about key-value
coding :) So whats the easiest way to tell it ? i.e. Should I
inherit from one of the EO classes that already implements it ?
Should the class implement NSKeyValueCoding itself ? And if so how
do I go about doing that ? Or is there a "normal" java equivalent ?
See the NSKeyValueCoding interface description in the WO API
javadoc. It describes a couple of approaches that are lighter weight
than inheriting from a class that implements NSKeyValueCoding. One
is to implement the NSKeyValueCoding interface using
NSKeyValueCoding.DefaultImplementation. Another is to send a
NSKeyValueCoding.Utility.valueForKey() instead of a valueForKey()
message to your object.
Aloha,
Art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden