• 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: binding an array controller to columns in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding an array controller to columns in an NSTableView


  • Subject: Re: binding an array controller to columns in an NSTableView
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 10 Sep 2012 19:15:46 -0700

On Sep 10, 2012, at 18:40 , Chuck Soper <email@hidden> 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@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: binding an array controller to columns in an NSTableView
      • From: Chuck Soper <email@hidden>
References: 
 >binding an array controller to columns in an NSTableView (From: Chuck Soper <email@hidden>)

  • Prev by Date: Re: binding an array controller to columns in an NSTableView
  • Next by Date: Re: Arghh bindings
  • Previous by thread: Re: binding an array controller to columns in an NSTableView
  • Next by thread: Re: binding an array controller to columns in an NSTableView
  • Index(es):
    • Date
    • Thread