C# Class KNFoundation.KNKVC.KNKVCSettable

Show file Open project: bt-browser/KNFoundation

Public Methods

Method Description
SetNullValueForKey ( this o, String key ) : void

Sets a value of the given key to null. Equivalent to Cocoa's –setNilValueForKey:.

SetValueForKey ( this o, Object value, String key ) : void

Attempts to set a Key-Value Coding compliant value on the given object using the given key. A Key-Value Coding compliant value is either a settable property named identically to the key or a method named SetKey()) that takes a single value. If the key doesn't exist, attempts to set SetValueForUndefinedKey() on the object, which by default throws an exception. Equivalent to -setValue:forKey: in Cocoa.

SetValueForKeyPath ( this o, Object value, String keyPath ) : void
SetValueForUndefinedKey ( this o, Object value, String key ) : void

Called when SetValueForKey() can't find a Key-Value coding compliant setter for the given key. If you wish to define custom behaviour for your object's KVC compliance, it's recommended that you override this method. The default implementation throws an exception. Equivalent to Cocoa's –setValue:forUndefinedKey:.

SetValuesForKeysWithDictionary ( this o, Object>.Dictionary keysAndValues ) : void

Sets a dictionary of keys at once. Calls SetValueForKey() for each key in the Dictionary. Equivalent to Cocoa's –setValuesForKeysWithDictionary:.

Method Details

SetNullValueForKey() public static method

Sets a value of the given key to null. Equivalent to Cocoa's –setNilValueForKey:.
public static SetNullValueForKey ( this o, String key ) : void
o this The base object.
key String The key to set to null.
return void

SetValueForKey() public static method

Attempts to set a Key-Value Coding compliant value on the given object using the given key. A Key-Value Coding compliant value is either a settable property named identically to the key or a method named SetKey()) that takes a single value. If the key doesn't exist, attempts to set SetValueForUndefinedKey() on the object, which by default throws an exception. Equivalent to -setValue:forKey: in Cocoa.
public static SetValueForKey ( this o, Object value, String key ) : void
o this The base object.
value Object The value to set.
key String The key to set.
return void

SetValueForKeyPath() public static method

public static SetValueForKeyPath ( this o, Object value, String keyPath ) : void
o this
value Object
keyPath String
return void

SetValueForUndefinedKey() public static method

Called when SetValueForKey() can't find a Key-Value coding compliant setter for the given key. If you wish to define custom behaviour for your object's KVC compliance, it's recommended that you override this method. The default implementation throws an exception. Equivalent to Cocoa's –setValue:forUndefinedKey:.
public static SetValueForUndefinedKey ( this o, Object value, String key ) : void
o this The base object.
value Object The value that should be set.
key String The key the value should be set for.
return void

SetValuesForKeysWithDictionary() public static method

Sets a dictionary of keys at once. Calls SetValueForKey() for each key in the Dictionary. Equivalent to Cocoa's –setValuesForKeysWithDictionary:.
public static SetValuesForKeysWithDictionary ( this o, Object>.Dictionary keysAndValues ) : void
o this The base object.
keysAndValues Object>.Dictionary A Dictionary of keys (NOT key paths) and values to set.
return void