MonobjcMonobjc Documented Class Library
AddObserverForKeyPathOptionsContext Method (anObserver, keyPath, options, context)
NamespacesMonobjc.FoundationNSObjectAddObserverForKeyPathOptionsContext(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers anObserver to receive KVO notifications for the specified key-path relative to the receiver.

Original signature is '- (void)addObserver:(NSObject *)anObserver forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(void *)context'

Available in Mac OS X v10.3 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual void AddObserverForKeyPathOptionsContext(
	NSObject anObserver,
	NSString keyPath,
	NSKeyValueObservingOptions options,
	IntPtr context
Public Overridable Sub AddObserverForKeyPathOptionsContext ( _
	anObserver As NSObject, _
	keyPath As NSString, _
	options As NSKeyValueObservingOptions, _
	context As IntPtr _
virtual void AddObserverForKeyPathOptionsContext(
	NSObject^ anObserver, 
	NSString^ keyPath, 
	NSKeyValueObservingOptions options, 
	IntPtr context
anObserver (NSObject)
The object to register for KVO notifications. The observer must implement the key-value observing method observeValueForKeyPath:ofObject:change:context:.
keyPath (NSString)
The key path, relative to the receiver, of the property to observe. This value must not be nil.
options (NSKeyValueObservingOptions)
A combination of the NSKeyValueObservingOptions values that specifies what is included in observation notifications. For possible values, see “NSKeyValueObservingOptions.”
context (IntPtr)
Arbitrary data that is passed to anObserver in observeValueForKeyPath:ofObject:change:context:.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)