• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
No changeFont notification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Socket Connections
  • Next by Date: Cpu temperature / mach system
  • Previous by thread: Re: Socket Connections
  • Next by thread: Cpu temperature / mach system
  • Index(es):
    • Date
    • Thread