Hi,
I have a control that needs to be highlighted when the font panel is visible.
This turns out not to be an easy task. I can't find any notifications that will
be triggered whenever the font panel is shown or is hidden.
windowDidUpdate: might do for discovering that the window is or has become
visible, but it's a bit hawkish to use for this purpose.
windowWillClose: only notifies if the panel gets closed, not if it is ordered
out.
I tried subclassing NSFontPanel by doing the following:
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
[NSFontManager setFontPanelFactory:[MY_FontPanel class]];
}
but it doesn't appear to work. The font panel returned by [NSFontPanel
sharedFontPanel] continues to be NSFontPanel, not MY_FontPanel.
What I want to do is override orderFront: and orderOut: in my subclass so that
I can send out some notifications whenever one of these is called.
Why does my call to setFontPanelFactory: not work, and how can I best achieve
my stated goal?
Kind Regards,
António Nunes
SintraWorks
-----------------------------------------------
Touch is a language without words
-----------------------------------------------
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]