• 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
Changing font stuff in NSTextView + Undo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changing font stuff in NSTextView + Undo


  • Subject: Changing font stuff in NSTextView + Undo
  • From: Bernie Zenis <email@hidden>
  • Date: Thu, 29 Jan 2004 14:25:25 -0500

Dear Cocoa Gurus,

I have a NSTextView. I want to make a change to the font of the current selection. So far, the only possibilities are changes to the font face or the font family. I know Cocoa is powerful, so is there an easy way to do this? I'm guessing that there might be a method somewhere (NSTextView, NSFontManager, etc.?) that I can call that will call a method in an object of a class that I wrote with my method taking a NSFont as input and returning a converted NSFont. I've been trying different things for a few days. I did come up with about 50 lines of code that makes the changes.

Also, Apple's docs say, "NSTextViews provide undo and redo behavior by default." The changes my code make are not automagically saved for undo.

Is there something that I'm missing?

Thanks,
Bernie
_______________________________________________
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: Changing font stuff in NSTextView + Undo
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: "check spelling as you type" persistence
  • Next by Date: MVC and multiple tables
  • Previous by thread: NSTableHeaderView background
  • Next by thread: Re: Changing font stuff in NSTextView + Undo
  • Index(es):
    • Date
    • Thread