Re: Bindling to array of NSImage
Re: Bindling to array of NSImage
- Subject: Re: Bindling to array of NSImage
- From: Scott Stevenson <email@hidden>
- Date: Wed, 17 Jan 2007 17:10:46 -0800
On Jan 17, 2007, at 2:19 PM, Tom Harrington wrote:
As I understand it now, the NSTableView's content binding
is created automatically from NSTableColumn bindings, so with multiple
NSArrays wanting to be bound on different columns it's not quite so
simple as it first appears in IB (I didn't realize that the
NSTableView even had a content binding until today).
I guess this could be done with a custom array controller, but as it
happens there's no reason I can't just use one array and simplify
things.
This is really something that should typically be done at the model
level, not by subclassing NSArrayController. It's hard to say how to
do it since I don't know what your data model is like, but one
approach is two have two "real" arrays and have a "shadow" array that
combines the two and is rebuilt when either of the other two change.
You'd then bind the table to the shadow array.
- Scott
_______________________________________________
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