Re: Font Trait Problem
Re: Font Trait Problem
- Subject: Re: Font Trait Problem
- From: "Timothy J. Wood" <email@hidden>
- Date: Thu, 28 Feb 2002 10:28:50 -0800
On Thursday, February 28, 2002, at 09:38 AM, Mamdouh wrote:
-(IBAction) changeFontStyle:(id)sender
{
NSFont *theFont;
theFont=[[NSFontManager sharedFontManager] convertFont:theFont
toHaveTrait:NSItalicFontMask];
}
This code shows you are passing an unitialized variable to
-convertFont:toHaveTrait:. You should pass your old font in and get a
new font out.
Also, make sure to retain the font you get back until you are done
with it.
-tim
_______________________________________________
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.