Up

NSKeyValueObserving documentation

Authors

Generated by Gregory John Casamento,,,

Date: Generated at 2023-12-20 19:35:39 -0500

Copyright: (C) 2005 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSArray(NSKeyValueObserverRegistration) category
  2. Software documentation for the NSObject(NSKeyValueObserverNotification) category
  3. Software documentation for the NSObject(NSKeyValueObserverRegistration) category
  4. Software documentation for the NSObject(NSKeyValueObserving) category
  5. Software documentation for the NSObject(NSKeyValueObservingCustomization) category

Software documentation for the NSArray(NSKeyValueObserverRegistration) category

NSArray(NSKeyValueObserverRegistration)

Declared in:
Foundation/NSKeyValueObserving.h
Availability: MacOS-X 10.3.0, Base 1.2.0

NSArray objects are not observable, so the registration methods raise an exception.
Method summary

addObserver: toObjectsAtIndexes: forKeyPath: options: context: 

- (void) addObserver: (NSObject*)anObserver toObjectsAtIndexes: (NSIndexSet*)indexes forKeyPath: (NSString*)aPath options: (NSKeyValueObservingOptions)options context: (void*)aContext;
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.

removeObserver: fromObjectsAtIndexes: forKeyPath: 

- (void) removeObserver: (NSObject*)anObserver fromObjectsAtIndexes: (NSIndexSet*)indexes forKeyPath: (NSString*)aPath;
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.

removeObserver: fromObjectsAtIndexes: forKeyPath: context: 

- (void) removeObserver: (NSObject*)anObserver fromObjectsAtIndexes: (NSIndexSet*)indexes forKeyPath: (NSString*)aPath context: (void*)context;
Availability: MacOS-X 10.7.0, Base 1.2.0

Description forthcoming.

Software documentation for the NSObject(NSKeyValueObserverNotification) category

NSObject(NSKeyValueObserverNotification)

Declared in:
Foundation/NSKeyValueObserving.h
Availability: MacOS-X 10.3.0, Base 1.2.0

These methods are sent to the receiver when observing it active for a key and the key is about to be (or has just been) changed.
Method summary

didChange: valuesAtIndexes: forKey: 

- (void) didChange: (NSKeyValueChange)changeKind valuesAtIndexes: (NSIndexSet*)indexes forKey: (NSString*)aKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

didChangeValueForKey: 

- (void) didChangeValueForKey: (NSString*)aKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

didChangeValueForKey: withSetMutation: usingObjects: 

- (void) didChangeValueForKey: (NSString*)aKey withSetMutation: (NSKeyValueSetMutationKind)mutationKind usingObjects: (NSSet*)objects;
Availability: MacOS-X 10.4.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

willChange: valuesAtIndexes: forKey: 

- (void) willChange: (NSKeyValueChange)changeKind valuesAtIndexes: (NSIndexSet*)indexes forKey: (NSString*)aKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

willChangeValueForKey: 

- (void) willChangeValueForKey: (NSString*)aKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

willChangeValueForKey: withSetMutation: usingObjects: 

- (void) willChangeValueForKey: (NSString*)aKey withSetMutation: (NSKeyValueSetMutationKind)mutationKind usingObjects: (NSSet*)objects;
Availability: MacOS-X 10.4.0, Base 1.2.0

An empty method provided for subclasses to override.
Description forthcoming.

Software documentation for the NSObject(NSKeyValueObserverRegistration) category

NSObject(NSKeyValueObserverRegistration)

Declared in:
Foundation/NSKeyValueObserving.h
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.
Method summary

addObserver: forKeyPath: options: context: 

- (void) addObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath options: (NSKeyValueObservingOptions)options context: (void*)aContext;
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.

removeObserver: forKeyPath: 

- (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath;
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.

removeObserver: forKeyPath: context: 

- (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath context: (void*)context;
Availability: MacOS-X 10.7.0, Base 1.2.0

Description forthcoming.

Software documentation for the NSObject(NSKeyValueObserving) category

NSObject(NSKeyValueObserving)

Declared in:
Foundation/NSKeyValueObserving.h
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.
Method summary

observeValueForKeyPath: ofObject: change: context: 

- (void) observeValueForKeyPath: (NSString*)aPath ofObject: (id)anObject change: (NSDictionary*)aChange context: (void*)aContext;
Availability: MacOS-X 10.3.0, Base 1.2.0

Description forthcoming.

Software documentation for the NSObject(NSKeyValueObservingCustomization) category

NSObject(NSKeyValueObservingCustomization)

Declared in:
Foundation/NSKeyValueObserving.h
Availability: MacOS-X 10.3.0, Base 1.2.0

These methods permit modifications to the observing system.
Method summary

automaticallyNotifiesObserversForKey: 

+ (BOOL) automaticallyNotifiesObserversForKey: (NSString*)aKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

Specifies whether the class should send the notification methods of the NSKeyValueObserverNotification protocol when instances of the class receive messages to change the value for the key.
The default implementation returns YES.

keyPathsForValuesAffectingValueForKey: 

+ (NSSet*) keyPathsForValuesAffectingValueForKey: (NSString*)dependentKey;
Availability: MacOS-X 10.5.0, Base 1.2.0

Returns a set of key paths for properties whose values affect the value of the specified dependentKey.

setKeys: triggerChangeNotificationsForDependentKey: 

+ (void) setKeys: (NSArray*)triggerKeys triggerChangeNotificationsForDependentKey: (NSString*)dependentKey;
Availability: MacOS-X 10.3.0, Base 1.2.0

Tells the observing system that when NSKeyValueObserverNotification protocol messages are sent for any key in the triggerKeys array, they should also be sent for dependentKey.

observationInfo 

- (void*) observationInfo;
Availability: MacOS-X 10.3.0, Base 1.2.0

Returns a reference to the observation information for the receiver as stored using the -setObservationInfo: method.
The default implementation returns information from a global table.

setObservationInfo: 

- (void) setObservationInfo: (void*)observationInfo;
Availability: MacOS-X 10.3.0, Base 1.2.0

Stores observation information for the receiver. By default this is done in a global table, but classes may implement storage in an instance variable or some other scheme (for improved performance).


Up