• 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: figuring out which TableView I am?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: figuring out which TableView I am?


  • Subject: Re: figuring out which TableView I am?
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 26 Apr 2009 17:19:15 -0700

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@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: figuring out which TableView I am?
      • From: WT <email@hidden>
    • Re: figuring out which TableView I am?
      • From: Jonathan Hess <email@hidden>
  • Prev by Date: Re: figuring out which TableView I am?
  • Next by Date: NSTextView re-implementing word wrapping
  • Previous by thread: Re: figuring out which TableView I am?
  • Next by thread: Re: figuring out which TableView I am?
  • Index(es):
    • Date
    • Thread