Re: NSTreeController bound selection issue
Re: NSTreeController bound selection issue
- Subject: Re: NSTreeController bound selection issue
- From: Keith Duncan <email@hidden>
- Date: Sat, 26 May 2007 00:22:53 +0100
This thread might be useful.
Yes it was, thanks for the link. Its odd that I haven't come up
against this issue before. Although when I went back and read the
bindings pages on apples site I found something I must've missed
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Concepts/MessageFlow.html#//apple_ref/doc/uid/
TP40002149-BCICADHC
In the "User Updates a Value in the User Interface" section step five
is "Invokes setValue:forKeyPath: on the controller" with the values
obviously taken from the infoForBinding dictionary.
Although after reviewing some header files, where do the AppKit
classes store the infoForBinding dictionary?
The upshot is that your binding of selectionIndexPaths is one
directional. Changes in your tree controller get relayed to your
custom view, but not the other way around. It's worth noting that
the GraphicsView in the GraphicBindings example <http://
homepage.mac.com/mmalc/CocoaExamples/controllers.html> calls the
controller directly to update the selection.
I have looked at mmalc's examples before but had thought that they
were to illustrate what goes on behind the scenes as far as bindings
are concerned. After having implemented my view bindings 'properly'
as it were it does seem like a lot of boilerplate code.
Anyway it is working great now, thanks.
- 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