NSTreeController bound selection issue
NSTreeController bound selection issue
- Subject: NSTreeController bound selection issue
- From: Keith Duncan <email@hidden>
- Date: Fri, 25 May 2007 11:59:01 +0100
I have an NSTreeController whose contentArray is bound to an array of
tree nodes.
I also have two different views bound to the tree controller. The
first view is an NSOutlineView which is bound to the arrangedObjects
and displays the tree correctly. The second is a custom NSView
subclass which is bound to the arrangedObjects and the
selectionIndexPaths. The outline view is there only so I can ensure
the custom view is displaying the tree correctly and for testing the
selection...
My problem is that changing the selection in the outline view cause
the controller to receive a setSelectionIndexPaths: message, which in
turn updates the selection in my custom NSView subclass. However
changing the selection in my custom view doesn't update the controller.
The custom view establishes its bindings using the default
implementation of bind:toObject:withKeyPath:options:, the accessors
for the views content and selectionIndexPaths array use the standard
retain release assign pattern and are KVC compliant.
I simply cannot see where I've gone wrong.
- Keith
_______________________________________________
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