C# Class KNFoundation.KNKVC.KNKVCSettable

Afficher le fichier Open project: bt-browser/KNFoundation

Méthodes publiques

Méthode 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 méthode

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.
Résultat void

SetValueForKey() public static méthode

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.
Résultat void

SetValueForKeyPath() public static méthode

public static SetValueForKeyPath ( this o, Object value, String keyPath ) : void
o this
value Object
keyPath String
Résultat void

SetValueForUndefinedKey() public static méthode

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.
Résultat void

SetValuesForKeysWithDictionary() public static méthode

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.
Résultat void