Proper KVO with NSTreeController + NSOutlineView
Proper KVO with NSTreeController + NSOutlineView
- Subject: Proper KVO with NSTreeController + NSOutlineView
- From: "Joseph M. Wollard" <email@hidden>
- Date: Thu, 27 Sep 2012 22:42:24 -0400
I'm pretty sure I'm doing something wrong here. I have an NSTreeController bound to the 'value' of an NSOutlineView's table column. The NSTreeController's content is then bound to a property of one of my classes which feeds it an appropriate hierarchy of NSMutableDictionary objects. So, dict -> tree -> outline. All data is being displayed beautifully in the outline view.
I'd like to observe a notification when a user edits (renames) an item in the outline view that tells me the old and new values. I'm getting notifications, but the old and new values are always null. For what it's worth, I'm currently observing the "content.name" key path of the NSTreeController instance - not sure if that makes a difference.
Since I want to know if the "name" of any object in the outline view changes, and what it's changed to/from, it made sense to observe that set of objects via the NSTreeController. Should I be observing notifications from the NSOutlineView instead?
Thanks for any guidance at all - I'm kinda stumped on this one.
_______________________________________________
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