Changing font stuff in NSTextView + Undo
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.