API  1.0.0
CPObject(KeyValueObserving) Category Reference

Instance Methods

(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - removeObserver:forKeyPath:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(BOOL) + automaticallyNotifiesObserversForKey:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 

Detailed Description

Definition at line 24 of file CPKeyValueObserving.j.

Method Documentation

◆ addObserver:forKeyPath:options:context:()

- (void) addObserver: (id)  anObserver
forKeyPath: (CPString aPath
options: (CPKeyValueObservingOptions)  options
context: (id)  aContext 
implementation

Extends class CPObject.

Definition at line 131 of file CPKeyValueObserving.j.

◆ applyChange:toKeyPath:()

- (void) applyChange: (CPDictionary aChange
toKeyPath: (CPString aKeyPath 
implementation

Extends class CPObject.

Definition at line 181 of file CPKeyValueObserving.j.

◆ automaticallyNotifiesObserversForKey:()

+ (BOOL) automaticallyNotifiesObserversForKey: (CPString aKey
implementation

Whether -willChangeValueForKey/-didChangeValueForKey should automatically be invoked when the setter of the given key is used. The default is YES. If you override this method to return NO for some key, you will need to call -willChangeValueForKey/-didChangeValueForKey manually to be KVO compliant.

The default implementation of this method will check if the receiving class implements + (BOOL)automaticallyNotifiesObserversOf<aKey> and return the response of that method if it exists.

Extends class CPObject.

Definition at line 157 of file CPKeyValueObserving.j.

◆ didChange:valuesAtIndexes:forKey:()

- (void) didChange: (CPKeyValueChange)  aChange
valuesAtIndexes: (CPIndexSet indexes
forKey: (CPString aKey 
implementation

Extends class CPObject.

Definition at line 79 of file CPKeyValueObserving.j.

◆ didChangeValueForKey:()

- (void) didChangeValueForKey: (CPString aKey
implementation

Extends class CPObject.

Definition at line 43 of file CPKeyValueObserving.j.

◆ didChangeValueForKey:withSetMutation:usingObjects:()

- (void) didChangeValueForKey: (CPString aKey
withSetMutation: (CPKeyValueSetMutationKind)  aMutationKind
usingObjects: (CPSet)  objects 
implementation

Extends class CPObject.

Definition at line 115 of file CPKeyValueObserving.j.

◆ keyPathsForValuesAffectingValueForKey:()

+ (CPSet) keyPathsForValuesAffectingValueForKey: (CPString aKey
implementation

Extends class CPObject.

Definition at line 169 of file CPKeyValueObserving.j.

◆ removeObserver:forKeyPath:()

- (void) removeObserver: (id)  anObserver
forKeyPath: (CPString aPath 
implementation

Extends class CPObject.

Definition at line 139 of file CPKeyValueObserving.j.

◆ willChange:valuesAtIndexes:forKey:()

- (void) willChange: (CPKeyValueChange)  aChange
valuesAtIndexes: (CPIndexSet indexes
forKey: (CPString aKey 
implementation

Extends class CPObject.

Definition at line 62 of file CPKeyValueObserving.j.

◆ willChangeValueForKey:()

- (void) willChangeValueForKey: (CPString aKey
implementation

Extends class CPObject.

Definition at line 26 of file CPKeyValueObserving.j.

◆ willChangeValueForKey:withSetMutation:usingObjects:()

- (void) willChangeValueForKey: (CPString aKey
withSetMutation: (CPKeyValueSetMutationKind)  aMutationKind
usingObjects: (CPSet)  objects 
implementation

Extends class CPObject.

Definition at line 98 of file CPKeyValueObserving.j.


The documentation for this category was generated from the following file: