Re: Binding to NSTreeController
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