Re: NSTreeController selection not updating
Re: NSTreeController selection not updating
- Subject: Re: NSTreeController selection not updating
- From: George Orthwein <email@hidden>
- Date: Mon, 7 May 2007 10:54:53 -0400
On May 6, 2007, at 10:48 PM, Sam Stigler wrote:
... I got a NO SELECTION MARKER even though I could clearly see
that something was selected in the outline view. Trying it with
the binding removed got the same result....
So it sounds like the problem is that the selection in the outline
view is not setting a selection in the tree controller. You could set
up an IBAction to set the tree controller selection to see if your
value transformer is then triggered.
The binding for the NSOutlineView is: content = (search results)
NSTreeController . arrangedObjects .
If I recall correctly (and that's perhaps a big IF :), when you
specify a content binding you also have to manually specify the
selectionIndexPaths binding of the NSOutlineView to the
NSTreeController's selectionIndexPaths. If you don't specify content
and merely bind the columns of the outline view, then the selection
and content is hooked up automagically based on the first column.
Oh, found it:
"If you bind the content explicitly rather than binding a column of
the NSOutlineView to the controller, you must also explicitly bind
the selectionIndexPaths and sortDescriptors to the controller."
http://developer.apple.com/documentation/Cocoa/Reference/
CocoaBindingsRef/BindingsText/NSOutlineView.html
I worked on a similar project many months ago. I haven't really
touched it since, so there are many details I don't remember. Maybe
it will help though.
http://www.cocoabuilder.com/archive/message/cocoa/2006/7/6/166974
George
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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