No changeFont notification
No changeFont notification
- Subject: No changeFont notification
- From: "K.K.Chan" <email@hidden>
- Date: Mon, 29 Apr 2002 19:31:27 +0800
Hello,
I have a problem here, I have been trying to implement font changing for
a text view. I can get the font panel for selection but after changing
font details, there is no notification (changeFont) coming back to
PrefController.
When I copy and paste this 2 methods on the main controller, it works.
Both MainController and PrefController are separate nibs. I have set
file owner (main nib) to delegate to MainController.
How do I set the notification for the other nib (PrefController) ?
Thanks in advance.
K.K.Chan
// preference window object
@implementation PrefController
// .. others not describe here
- (IBAction)fontBtn:(id)sender
{
[[NSFontManager sharedFontManager] setSelectedFont:
[NSFont fontWithName:@"Monaco" size:10] isMultiple:NO];
[[NSFontManager sharedFontManager] orderFrontFontPanel:self];
}
- (void)changeFont:(id)fontManager
{
NSFont *panelFont;
NSString *str;
// Never reach here....
panelFont = [fontManager convertFont:[fontManager selectedFont]];
str = [panelFont displayName];
NSLog(str);
}
@end
_______________________________________________
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.