• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Font Trait Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Font Trait Problem
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: Re: NSWorkspaceRecycleOperation and auto-renaming items moved to Trash
  • Next by Date: Re: Two basic questions
  • Previous by thread: Re: HTTP and FTP with cocoa
  • Next by thread: Re: Font Trait Problem
  • Index(es):
    • Date
    • Thread