I have an NSArrayController (itemsController) which hold an array of MyObject. This controller is tied to an NSTableView which has several columns, all bound to different properties.
I want to observe one of these properties elsewhere in the app.
[[self itemsController] addObserver:self forKeyPath:@"selectedObjects.someProperty" options:NSKeyValueObservingOptionNew context:nil];
In the callback:
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
I am getting called whenever any property in the selection changes, but I only want to be called when someProperty in a selected object changes.
How can I prevent all these other calls when nothing has really changed?
Observing @"selection.someProperty" has the same results.