Re: Saving NSFonts and changedFont: trouble
Re: Saving NSFonts and changedFont: trouble
- Subject: Re: Saving NSFonts and changedFont: trouble
- From: Michael Vannorsdel <email@hidden>
- Date: Tue, 8 Apr 2008 10:02:27 -0600
The font panel sends it's messages to the shared font manager. You
can make your own font panel subclass and tell the font manager to use
it with setFontPanelFactory:. It's possible the textView is absorbing
the changedFont: message, you might need to implement
textView:shouldChangeTextInRanges:replacementStrings: for the textView
or a different delegate handler.
On Apr 8, 2008, at 9:34 AM, Thomas Backman wrote:
ep, I am, unfortunately.
The whole method, bar 3 lines for saving to user defaults, is
- (void)changeFont:(id)sender {
NSFont *oldFont = [textView font];
NSFont *newFont = [sender convertFont:oldFont];
[textView setFont:newFont];
}
Worth mentioning is that before clicking in the textview, the font
panel is pretty "blank". No font or size selected. In this state,
everything works. Then, when I click in the view, the correct family
and size is selected, and it's no longer possible to change
anything; it simply ignores it. I'm guessing the message is being
sent to the wrong object... How do I tell the panel where to send
all messages for the entire program? TBH I'm not sure why it *does*
work at all. ;)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden