Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Resign from being the first responder for the NSFontmanager

Hi All,


I have preference window ( accessed thruough preferences menu) where I let the user set the font and color for text displayed in my main window. This all works fine, as I have overidden the ChangeFont method. Here is the code I have used:


// request to display the font panel, received from the preference window

- (IBAction)displayFontPanel:(id)sender{

NSFontManager *fontManager = [NSFontManagersharedFontManager];

NSFontPanel *fontPanel = [fontManager fontPanel:YES];

[fontManager setTarget:self];

[fontPanel makeKeyAndOrderFront:sender];

}


// font change : received when font is changed in the preference window

- (void)changeFont:(id)sender {

titleFont = [sender convertFont:titleFont];

[selfUpdatePrefWindow :titleFont];

[selfappPreferences:updatePlist];

}


The issue now is that all other text fields and text views in my main window are not able to receive the changeFont message. What I am trying to do is to resign from being the first responder once the preference window is deactivted and become the first responder again when it is achitvated. Any ideas.


Thanks


Rashid

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on Jan 12, 2013 5:32 AM

Reply

There are no replies.

Resign from being the first responder for the NSFontmanager

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.