org.rococoa.cocoa.foundation.categories
Interface NSKeyValueObserving

All Superinterfaces:
ObjCObject

public interface NSKeyValueObserving
extends ObjCObject

This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static interface NSKeyValueObserving._static_
           
 
Method Summary
 void observeValueForKeyPath_ofObject_change_context(NSString keyPath, ObjCObject object, NSDictionary change, Pointer context)
          Given that the receiver has been registered as an observer of the value at a key path relative to an object, be notified of a change to that value.
 
Methods inherited from interface org.rococoa.ObjCObject
id
 

Method Detail

observeValueForKeyPath_ofObject_change_context

void observeValueForKeyPath_ofObject_change_context(NSString keyPath,
                                                    ObjCObject object,
                                                    NSDictionary change,
                                                    Pointer context)
Given that the receiver has been registered as an observer of the value at a key path relative to an object, be notified of a change to that value.
The change dictionary always contains an NSKeyValueChangeKindKey entry whose value is an NSNumber wrapping an NSKeyValueChange (use -[NSNumber unsignedIntegerValue]). The meaning of NSKeyValueChange depends on what sort of property is identified by the key path:
- For any sort of property (attribute, to-one relationship, or ordered or unordered to-many relationship) NSKeyValueChangeSetting indicates that the observed object has received a -setValue:forKey: message, or that the key-value coding-compliant set method for the key has been invoked, or that a -willChangeValueForKey:/-didChangeValueForKey: pair has otherwise been invoked.
- For an _ordered_ to-many relationship, NSKeyValueChangeInsertion, NSKeyValueChangeRemoval, and NSKeyValueChangeReplacement indicate that a mutating message has been sent to the array returned by a -mutableArrayValueForKey: message sent to the object, or that one of the key-value coding-compliant array mutation methods for the key has been invoked, or that a -willChange:valuesAtIndexes:forKey:/-didChange:valuesAtIndexes:forKey: pair has otherwise been invoked.
- For an _unordered_ to-many relationship (introduced in Mac OS 10.4), NSKeyValueChangeInsertion, NSKeyValueChangeRemoval, and NSKeyValueChangeReplacement indicate that a mutating message has been sent to the set returned by a -mutableSetValueForKey: message sent to the object, or that one of the key-value coding-compliant set mutation methods for the key has been invoked, or that a -willChangeValueForKey:withSetMutation:usingObjects:/-didChangeValueForKey:withSetMutation:usingObjects: pair has otherwise been invoked.
For any sort of property, the change dictionary contains an NSKeyValueChangeNewKey entry if NSKeyValueObservingOptionNew was specified at observer registration time, it's the right kind of change, and this isn't a prior notification. The change dictionary contains an NSKeyValueChangeOldKey if NSKeyValueObservingOptionOld was specified and it's the right kind of change. See the comments for the NSKeyValueObserverNotification informal protocol methods for what the values of those entries can be.
For an _ordered_ to-many relationship, the change dictionary always contains an NSKeyValueChangeIndexesKey entry whose value is an NSIndexSet containing the indexes of the inserted, removed, or replaced objects, unless the change is an NSKeyValueChangeSetting.
If NSKeyValueObservingOptionPrior (introduced in Mac OS 10.5) was specified at observer registration time, and this notification is one being sent prior to a change as a result, the change dictionary contains an NSKeyValueChangeNotificationIsPriorKey entry whose value is an NSNumber wrapping YES (use -[NSNumber boolValue]).
context is always the same pointer that was passed in at observer registration time.
Original signature : -(void)observeValueForKeyPath:(NSString*) ofObject:(id) change:(NSDictionary*) context:(void*)
from NSKeyValueObserving native declaration : NSKeyValueObserving.h:88



Copyright © 2009. All Rights Reserved.