Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSKeyValueObserverMBS class.

NSKeyValueObserverMBS.kChangeInsertion = 2

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the kind constants used with NSKeyValueChangeKindKey.

Indicates that an object has been inserted into the to-many relationship that is being observed.

NSKeyValueObserverMBS.kChangeRemoval = 3

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the kind constants used with NSKeyValueChangeKindKey.

Indicates that an object has been removed from the to-many relationship that is being observed.

NSKeyValueObserverMBS.kChangeReplacement = 4

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the kind constants used with NSKeyValueChangeKindKey.

Indicates that an object has been replaced in the to-many relationship that is being observed.

NSKeyValueObserverMBS.kChangeSetting = 1

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the kind constants used with NSKeyValueChangeKindKey.

Indicates that the value of the observed key path was set to a new value. This change can occur when observing an attribute of an object, as well as properties that specify to-one and to-many relationships.

NSKeyValueObserverMBS.kOptionInitial = 4

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the constants to be passed to addObserver and determine the values that are returned as part of the change dictionary passed to observedValueForKeyPathChanged.

If specified, a notification should be sent to the observer immediately, before the observer registration method even returns.
The change dictionary in the notification will always contain an NSKeyValueChangeNewKey entry if kOptionNew is also specified but will never contain an NSKeyValueChangeOldKey entry. (In an initial notification the current value of the observed property may be old, but it's new to the observer.) You can use this option instead of explicitly invoking, at the same time, code that is also invoked by the observer's observedValueForKeyPathChanged method. When this option is used with addObserver a notification will be sent for each indexed object to which the observer is being added.
Available in OS X v10.5 and later.

NSKeyValueObserverMBS.kOptionNew = 1

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the constants to be passed to addObserver and determine the values that are returned as part of the change dictionary passed to observedValueForKeyPathChanged.

Indicates that the change dictionary should provide the new attribute value, if applicable.
Available in OS X v10.3 and later.

NSKeyValueObserverMBS.kOptionOld = 2

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the constants to be passed to addObserver and determine the values that are returned as part of the change dictionary passed to observedValueForKeyPathChanged.

Indicates that the change dictionary should contain the old attribute value, if applicable.
Available in OS X v10.3 and later.

NSKeyValueObserverMBS.kOptionPrior = 8

Type Topic Plugin Version
const Cocoa MBS MacBase Plugin 13.1
One of the constants to be passed to addObserver and determine the values that are returned as part of the change dictionary passed to observedValueForKeyPathChanged.

Whether separate notifications should be sent to the observer before and after each change, instead of a single notification after the change.
The change dictionary in a notification sent before a change always contains an NSKeyValueChangeNotificationIsPriorKey entry whose value is true, but never contains an NSKeyValueChangeNewKey entry. When this option is specified the change dictionary in a notification sent after a change contains the same entries that it would contain if this option were not specified. You can use this option when the observer's own key-value observing-compliance requires it to invoke one of the -willChange... methods for one of its own properties, and the value of that property depends on the value of the observed object's property. (In that situation it's too late to easily invoke -willChange... properly in response to receiving an observedValueForKeyPathChanged message after the change.)
Available in OS X v10.5 and later.

The items on this page are in the following plugins: MBS MacBase Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...