NSTableView and NSArrayController's selectionIndexes
NSTableView and NSArrayController's selectionIndexes
- Subject: NSTableView and NSArrayController's selectionIndexes
- From: Joshua Scott Emmons <email@hidden>
- Date: Wed, 22 Mar 2006 11:12:24 -0600
I'd been trying to figure out how NSTableView managed the selection
of a bound NSArrayController. I was stymied until I read the
following in mmalcolm's excellent Cocoa Bindings Examples and Hints
page:
[When subclassing NSTableView] You must also bind this NSTableView's
"content", "selectionIndexes", and "sortDescriptors" to your chosen
array controller (using the Controller Keys "arrangedObjects",
"selectionIndexes", and "sortDescriptors" respectively). (The auto-
binding that NSTableView normally does for you is done via SPI and
not caught by our subclassing.)
So I gather that some magic is happening that causes NSTableView to
bind content, selectionInexes, and sortDescriptors behind the scenes.
But I don't recognize the TLA SPI (unless it means Service Provider
Interface, in which case I don't understand the context). Can anyone
explain a little bit more about the magic and how it's performed?
Many thanks!
-Joshua Emmons
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden