NSFontManager changeFont not called
NSFontManager changeFont not called
- Subject: NSFontManager changeFont not called
- From: Alexander Veenendaal <email@hidden>
- Date: Mon, 24 Jun 2002 11:30:38 +0100
I am having issues trying to get the font panel to send a changeFont:
message to my NSView subclass. A similar problem has been asked a few
times before:
http://cocoa.mamasam.com/COCOADEV/2001/10/1/13875.php
From the views init method, I am calling:
[[NSFontManager sharedFontManager] setDelegate:self];
To display the font panel I am calling:
[[NSFontManager sharedFontManager] orderFrontFontPanel:self];
And then providing the changeFont method:
- (void)changeFont:(id)fontManager
{
NSFont* newFont = [[NSFontManager sharedFontManager]
convertFont:[[NSFontManager sharedFontManager] selectedFont]];
NSLog(@"Font Changed to %@", [newFont fontName] );
}
however nothing happens.
The message:
[self respondsToSelector: @selector(changeFont:)]
returns true, and the method is succesfully invoked using:
[self performSelector:@selector(changeFont:) withObject:self];
So what then am I missing ?
_______________________________________________
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.