• 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 NSFontPanel color changes [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting NSFontPanel color changes [SOLVED]


  • Subject: Re: Getting NSFontPanel color changes [SOLVED]
  • From: Glen Low <email@hidden>
  • Date: Mon, 26 Apr 2004 16:53:56 +0800

All:

On 26/04/2004, at 3:52 AM, email@hidden wrote:

I'm looking at the NSFontPanel/NSFontManager machinery and I must say
it's very comprehensive albeit somewhat mystifying.

I can get font changes from the font panel which get passed up the
respond chain via the message changeFont:

Ditto for attributes like underline etc. via the message
changeAttributes:

But how do I receive color and background color changes?


Apparently the NSFontPanel sends an undocumented setColor:forAttribute: message to the responder chain, where the first param is an NSColor and the second is a NSString which has the attribute name to change (either color or background color). Interestingly enough, none of the AppKit actually seem to declare this message (by doing an otool -ov AppKit | grep "setColor" | get "forAttribute") ... I only found it by overriding "respondsToSelector" to see what methods the NSFontPanel was probing for.

Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Getting NSFontPanel color changes [SOLVED]
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: custom alert panel
  • Next by Date: Re: "Merged cells"
  • Previous by thread: Re: custom alert panel
  • Next by thread: Re: Getting NSFontPanel color changes [SOLVED]
  • Index(es):
    • Date
    • Thread