I'm trying to track down (in a project I inherited, not wrote) why a KVO notification is being sent twice. The reason I care is because, the table contains a variety of types of data, and for one particular type of data I need to do something special when it is selected, and then revert that when any other type of data is selected, and this double-notification is screwing things up.

Here's the stack trace:

-[CLController observeValueForKeyPath:ofObject:change:context:] at CLController.m:448
NSKVONotify
-[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:]
-[NSController _notifyObserversForKeyPath:change:]
-[NSController didChangeValueForKey:]
-[NSTreeController _didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:] -[NSTreeController _selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications :] -[NSTreeController _selectObjectsAtIndexPaths:avoidsEmptySelection:sendObserverNotifications :]
-[NSTreeController setSelectionIndexPaths:]
-[NSObject(NSKeyValueCoding) setValue:forKey:]
-[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
-[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error :]
-[NSBinder setValue:forBinding:error:]
-[NSOutlineViewBinder tableView:didChangeToSelectedRowIndexes:]
-[_NSBindingAdaptor tableView:didChangeToSelectedRowIndexes:]
-[NSTableView _enableSelectionPostingAndPost]
-[NSTableView mouseDown:]
-[NSOutlineView mouseDown:]
-[NSWindow sendEvent:]
-[NSApplication sendEvent:]
-[NSApplication run]
NSApplicationMain
main at main.m:13

Notice my code only shows up at the last call, in response to the notification; the keyPath for each notification is the same.

Can anyone give me any tips on how to track down why this notification is being sent twice?

Thanks!
randy
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to