• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Proper KVO with NSTreeController + NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Proper KVO with NSTreeController + NSOutlineView
      • From: Dave Keck <email@hidden>
    • Re: Proper KVO with NSTreeController + NSOutlineView
      • From: Alex Zavatone <email@hidden>
  • Prev by Date: Re: splitting CJK text into "words"
  • Next by Date: Registering iOS developer program
  • Previous by thread: interpretKeyEvents: and insertText: under 10.8
  • Next by thread: Re: Proper KVO with NSTreeController + NSOutlineView
  • Index(es):
    • Date
    • Thread