Jonathan Hess wrote:

Why not have a property/instance-variable that controls this directly and then set that in awakeFromNib from one of the controller classes that has an outlet to each of the table views?

If you needed a fully scalable solution with support for arbitrary properties, that would be the way to go. But the OP didn't need that. All he needed was 3 color-scheme variations of an otherwise standard NSTableView.

  http://lists.apple.com/archives/cocoa-dev/2009/Apr/msg01800.html

Even supposing the designer can't decide which colors to use for text and background, tags can still work. Simply reserve 8-bits of the tag for the text-color, 8-bits for the bkgd-color, and index into a table of the web-safe colors.

  http://en.wikipedia.org/wiki/Web_colors

Or index into a table of arbitrarily defined colors. You can get as much flexibility of colors as you care to program, and there are still 16 bits unused in the tag.

Will this provide a fully scalable solution for arbitrary properties? No. But it doesn't need to be. Some things will never need to scalable. When the simpler solution no longer suffices, that's the time to create a more complex and scalable one.

  -- GG
_______________________________________________

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

This email sent to [email protected]

Reply via email to