Font Trait Problem
Font Trait Problem
- Subject: Font Trait Problem
- From: Mamdouh <email@hidden>
- Date: Thu, 28 Feb 2002 18:38:58 +0100
Hi..
I4m trying to learn Cocoa by making a text editor (ala reenventing the
wheel:-), and until now its going pretty good for the first time
programmer i am! But when i tryed to impliment font traits i got into a
problem that seems unclisifiable! When looking around i found out how to
impliment it and here is the code i wrote for the bold font trait action:
-(IBAction) changeFontStyle:(id)sender
{
NSFont *theFont;
theFont=[[NSFontManager sharedFontManager] convertFont:theFont
toHaveTrait:NSItalicFontMask];
}
This compiles correctly, but when i try pressing the button that has the
hangeFontStyle: action, nothing happenes! And if i press it 2 times the
app crashes!
What am i doing wrong? What am i missing here?
Thanks
Mamdouh
Student/Programmer
_______________________________________________
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.