• 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
NSFontManager changeFont not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSFontManager changeFont not called
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Creating temporary files?
  • Next by Date: Re: NSFontManager changeFont not called
  • Previous by thread: Re: Problems creating an NSWindow in a Finder CFPlugIn
  • Next by thread: Re: NSFontManager changeFont not called
  • Index(es):
    • Date
    • Thread