Interface next.util.KeyValueCoding

All Packages  Class Hierarchy  This Package  Previous  Next 

Interface next.util.KeyValueCoding

public interface KeyValueCoding
extends Object
Classes implement the KeyValueCoding interface to return and set the values of obect attributes as identified by a string key. In contrast to the Java "put" convention, this interface uses the more Objective-C-like takeValueForKey(Object, String). The value set by the takeValueForKey(Object, String) method must be a property-list type of object. In Java, this must be a String, Vector, Hashtable, or byte[] object; the corresponding Objective-C object types are NSString, NSArray, NSDictionary, and NSData. In the client-side components feature, Association objects must implement the methods of this interface to set and return the values of their associated applets. Applets can assume the responsibility of an Association object by implementing the SimpleAssociationDestination interface, which includes the methods of the KeyValueCoding interface. Key-value coding in client-side components must always deal with state keys, never with actions.
See Also:
SimpleAssociationDestination, Association

Method Index

 o takeValueForKey(Object, String)
Sets the value of the applet state or binding identified by key to value.
 o valueForKey(String)
Returns the value (as a property-list object) for the applet state or action identified by key.

Methods

 o valueForKey

  public abstract Object valueForKey(String key)

Returns the value (as a property-list object) for the applet state or action identified by key.
 o takeValueForKey

  public abstract void takeValueForKey(Object value,

                                       String key)

Sets the value of the applet state or binding identified by key to value. The value must be a property-list type of object: String, Vector, Hashtable, or byte[]. Note that you can have nested property-lists, like a Vector containing Hashtables.


Class Hierarchy  This Package  Previous  Next