Re: Getting Text Colors Right for Derived NSTextFieldCell under Various Conditions
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