Re: Getting NSFontPanel color changes [SOLVED]
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.