• 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: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions


  • Subject: Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
  • From: Jim Correia <email@hidden>
  • Date: Sat, 5 Dec 2009 00:37:15 -0500

On Dec 4, 2009, at 10:54 PM, Grant Erickson wrote:

> Thanks for the prompt reply. I forgot to mention one key element. The
> subclass must support 10.4- and later so I cannot rely on 10.5- and later
> APIs such as this.

In that situation I’d probably write (and test!)

if ([self respondsToSelector: @selector(interiorBackgroundStyle)]) {
	… compute text color from background style ...
} else {
	… best effort text color calculation ...
}

Hopefully sometime soon the 10.4 branch can just go away.

(If you have an existing product which already targets 10.4, changing the system requirements for something like this seems drastic. However, if you are developing a new product, you may want to seriously consider whether you really need to support Tiger, and the opportunity cost of doing so.)

Jim_______________________________________________

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

References: 
 >Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions (From: Grant Erickson <email@hidden>)

  • Prev by Date: Re: Is it possible to pass an object to a NIB
  • Next by Date: Calling Methods From Custom UIImageView's initWithImage
  • Previous by thread: Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
  • Next by thread: NSRuleEditor rows binding
  • Index(es):
    • Date
    • Thread