On 4 Sep 2011, at 08:40, Antonio Nunes wrote:
> 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?
FWIW On OS X 10.7.1 I couldn't successfully change the font panel class either.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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]