public final class NSKeyValueObservingOptions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
Initial
Whether a notification should be sent to the observer immediately, before the observer registration method even returns.
|
static long |
New
Whether the change dictionaries sent in notifications should contain NSKeyValueChangeNewKey and NSKeyValueChangeOldKey entries, respectively.
|
static long |
Old
Whether the change dictionaries sent in notifications should contain NSKeyValueChangeNewKey and NSKeyValueChangeOldKey entries, respectively.
|
static long |
Prior
Whether separate notifications should be sent to the observer before and after each change, instead of a single notification after the change.
|
public static final long New
public static final long Old
public static final long Initial
public static final long Prior
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, except for ordered unique to-many relationships represented by NSOrderedSets. For those, for NSKeyValueChangeInsertion and NSKeyValueChangeReplacement changes, the change dictionary for a will-change notification contains an NSKeyValueChangeIndexesKey (and NSKeyValueChangeOldKey in the case of Replacement where the NSKeyValueObservingOptionOld option was specified at registration time) which give the indexes (and objects) which *may* be changed by the operation. The second notification, after the change, contains entries reporting what did actually change. For NSKeyValueChangeRemoval changes, removals by index are precise.