Re: addObserver:
Re: addObserver:
- Subject: Re: addObserver:
- From: Negm-Awad Amin <email@hidden>
- Date: Mon, 11 Aug 2008 16:34:08 +0200
Am Mo,11.08.2008 um 16:15 schrieb Chris Idou:
I'm making the following call (and defining observeValueForKeyPath
on self etc) on an NSArrayController, hoping to get notifications of
it changing. But I don't seem to be getting any notifications.
Should this work?
[arrayController addObserver:self
forKeyPath:@"content" options:(NSKeyValueObservingOptionNew|
NSKeyValueObservingOptionOld)
context:nil];
You should set the observation to the observable property of the array
controller, i. g. the "output". Use the key @"arrangedObjects" instead
of @"content". (content is the bound property, the "input".)
Amin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Amin Negm-Awad
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden