• 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
Re: Binding to NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to NSTreeController


  • Subject: Re: Binding to NSTreeController
  • From: Felix Franz <email@hidden>
  • Date: Thu, 28 Jun 2007 19:47:44 +0200

On Jun 28, 2007, at 7:27 PM, Chris Blackburn wrote:

Hey there everyone,

I have managed to get an NSBrowser binding to an NSTreeController which contains an XML Document. Everything is formatted properly in the NSBrowser and works well, however...

I also have an NSTextField on the Window that I would like to bind to an attribute of the object that is currently selected in the NSBrowser. Now I did what I would do if this was an NSArrayController and bound the value of the NSTextField to "selection.displayName". I know that the displayName part of this key path is correct because it is what is being used to render the NSBrowser.

But when I run the code the NSTextField always shows "No Selection" no matter what I click on in the NSBrowser.

maybe you missed the selectionIndexPaths-binding of your NSBrowser? Unless you use this binding
(bind it to NSTreeControllers selectionIndexPaths) the TreeController has no clue about the
selection ... just a guess.


Cheers,

felix

_______________________________________________

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: Binding to NSTreeController
      • From: Chris Blackburn <email@hidden>
References: 
 >Binding to NSTreeController (From: Chris Blackburn <email@hidden>)

  • Prev by Date: Binding to NSTreeController
  • Next by Date: Re: Use UI or data for logic? (hijacked from Two NSRects adjacent/touching?)
  • Previous by thread: Binding to NSTreeController
  • Next by thread: Re: Binding to NSTreeController
  • Index(es):
    • Date
    • Thread