Re: [repost] Using NSFontPanel in a prefPane ?
Re: [repost] Using NSFontPanel in a prefPane ?
- Subject: Re: [repost] Using NSFontPanel in a prefPane ?
- From: Yann Bizeul <email@hidden>
- Date: Sun, 1 Dec 2002 22:50:58 +0100
do not work :
-[GeekToolPrefs becomeFirstResponder]: selector not recognized
-[GeekToolPrefs flagsChanged:]: selector not recognized
it appears that you're trying to make the GeekToolPrefs (which I'm
assuming is your custom class) the first responder, but it doesn't
inherit from NSResponder, so that's a problem.
I think you're right, but how do I make something that could no be
first responder get NSFontManager's changeFont: calls ?
Or perhaps there is something missing in the example, the syntax is
not correct, as if a line is missing at beginning (no opening { and a
; on the first line):
- (void)changeTextFont:(id)sender;
[[self window] makeFirstResponder:[fontTextField window]];
[[NSFontManager sharedFontManager] orderFrontFontPanel:self];
[[NSFontManager sharedFontManager] setSelectedFont:[self font]
isMultiple:NO];
}
a missing {... the ; on the end of the first line is OK syntax wise,
and makes it easier to copy and paste into the header.
Some things are good to know ;-) BTW, there is a "{" missing, isn't it ?
--
Yann Bizeul
TYNSOE.ORG -
http://www.tynsoe.org/
Site technique consacri ` MacOS X
_______________________________________________
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.