• 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: NSTreeController bound selection issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTreeController bound selection issue (From: Keith Duncan <email@hidden>)
 >Re: NSTreeController bound selection issue (From: m <email@hidden>)
 >Re: NSTreeController bound selection issue (From: Keith Duncan <email@hidden>)
 >Re: NSTreeController bound selection issue (From: m <email@hidden>)

  • Prev by Date: Capture ARP packets
  • Next by Date: Re: How to capture my desktop?
  • Previous by thread: Re: NSTreeController bound selection issue
  • Next by thread: NSDocumentController Question
  • Index(es):
    • Date
    • Thread