On Sep 10, 2012, at 18:40 , Chuck Soper <[email protected]> wrote:

> I understand how to bind an array controller (for an entity) to rows in a
> table, and how to bind a Text Field in the Table Cell View to an entity
> property. I'm not sure how to go about this for columns in a table. I
> assume that I may need to take a programmatic approach. Has anyone done
> this? Or, can someone point me in the right direction?

You can't do this with bindings. Tables are row-oriented, and there's no 
built-in  behavior that will add or remove columns like it does for rows.

If your colors have a name, you could (programmatically) create a column for 
each existing column name, using the name as the column identifier, which 
should ease the problem of matching columns to colors. You'll also need a way 
of deciding what order to show the columns in. Then you can use something like 
KVO to watch for changes in the set of colors, and make corresponding 
adjustments to the table.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to