Re: Need help setting font of NSTextView
Re: Need help setting font of NSTextView
- Subject: Re: Need help setting font of NSTextView
- From: Douglas Davidson <email@hidden>
- Date: Fri, 11 Jan 2002 09:45:32 -0800
On Thursday, January 10, 2002, at 08:52 PM, Doug Brown wrote:
I'm confused again - I don't understand the Cocoa docs. I looked at the
TextEdit Preferences.m file, but I'm still confused. I think I have
implemented the Font panel, but I don't understand what I'm supposed to
be doing in the -changeFont: method. Also, I don't understand how to
use -convertFont:
When something changes in the font panel, the font manager calls
changeFont:. Your changeFont: method then takes whatever existing
font(s) you have, calls convertFont:myExistingFont on the font manager
for each one of those, and replaces myExistingFont in your document with
the result of that call. The idea is that convertFont: applies the
change the user specified in the font panel to the font you supply to it.
Douglas Davidson