- Package:
- com.webobjects.foundation
Interface Description
The NSKeyValueCoding.ErrorHandling interface declares an API for handling errors that occur during key-value coding. For more information, see the NSKeyValueCoding interface specification.
Instance Methods
public Object handleQueryWithUnboundKey(String key)
Invoked from valueForKey when it finds no property binding for key. The default implementation (see the NSKeyValueCoding. DefaultImplementation class specification) throws an NSKeyValueCoding.UnknownKeyException, with the target object ( TargetObjectUserInfoKey) and key ( UnknownUserInfoKey) in the user info. An NSKeyValueCoding.ErrorHandling class can override this method to handle the query in some other way. The method can return a value, in which case that value is returned by the corresponding valueForKey invocation.
public void handleTakeValueForUnboundKey( Object value, String key)
Invoked from takeValueForKey when it finds no property binding for key. The default implementation (see the NSKeyValueCoding. DefaultImplementation class specification) throws an NSKeyValueCoding.UnknownKeyException, with the target object ( TargetObjectUserInfoKey) and key ( UnknownUserInfoKey) in the user info.
public void unableToSetNullForKey(String key)
Invoked from takeValueForKey when it's given a null
value for a scalar property (such as an int or a float). The default implementation (see the NSKeyValueCoding. DefaultImplementation class specification) throws an IllegalArgumentException. You might want to implement the method (or override the inherited implementation) to handle the request in some other way, such as by substituting zero or a sentinel value and invoking takeValueForKey again.
© 2001 Apple Computer, Inc. (Last Published April 17, 2001)