• 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: Setting NSColorPanel to affect NSBackgroundColorAttributeName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting NSColorPanel to affect NSBackgroundColorAttributeName


  • Subject: Re: Setting NSColorPanel to affect NSBackgroundColorAttributeName
  • From: Martin Wierschin <email@hidden>
  • Date: Thu, 13 Dec 2007 18:24:11 -0800

So, when you select Format > Font > Show Colors, which you would expect to affect the foreground colour as it does in TextEdit, it will now affect the background colour if the background colour button has been used.

Can't you just have the action method for your Show Colors menu reset your color targeting state? Just replace the default action with one that clears your flag and then calls the default color panel method.


In our application we have other complications that required overriding private NSColorPanel methods that work in tandem with some custom subclasses. It's pretty messy and hopefully you don't need to go that route.

~Martin

_______________________________________________

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: 
 >Setting NSColorPanel to affect NSBackgroundColorAttributeName (From: Keith Blount <email@hidden>)

  • Prev by Date: Is NSTableView sortDescriptors KVO compliant?
  • Next by Date: Re: [Worse] Re: [NSImage initWithData]: Memory leak. Bug in code or in Framework?
  • Previous by thread: Setting NSColorPanel to affect NSBackgroundColorAttributeName
  • Next by thread: Re: Setting NSColorPanel to affect NSBackgroundColorAttributeName
  • Index(es):
    • Date
    • Thread