NSTableView bindings assumptions
NSTableView bindings assumptions
- Subject: NSTableView bindings assumptions
- From: David Catmull <email@hidden>
- Date: Wed, 31 May 2006 15:17:15 -0700
As an experiment, I tried binding an NSTableView's columns to an
NSArrayController's selectedObjects instead of arrangedObjects. I was
testing a theory that NSTableView assumes it's going to be bound to
arrangedObjects and always sets its row count accordingly. I was right.
The result was a table with a row count equal to the number of items
in the array, but every item displayed the same data: the contents of
the array items corresponding to the table view's selection. It was
like browsing a list through a kaleidoscope :)
There seem to be a lot of assumptions and hidden workings when it
comes to bindings and table views. Are these details documented
anywhere, officially or not? The documentation seems to assume you're
always going to do it the normal way, where It Just Works. But I bet
knowing what's going on under the hood would help me understand
bindings a lot better.
This isn't just idle curiosity either: I'm working on a bindings
interface for Carbon controls, since Carbon-Cocoa integration still
has a ways to go.
I could also see what happens if I bind each column to a different
controller...
--
David Catmull
email@hidden
http://www.uncommonplace.com/
_______________________________________________
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