Re: Changing font stuff in NSTextView + Undo
Re: Changing font stuff in NSTextView + Undo
- Subject: Re: Changing font stuff in NSTextView + Undo
- From: Douglas Davidson <email@hidden>
- Date: Fri, 30 Jan 2004 16:51:43 -0800
On Jan 29, 2004, at 9:13 PM, Bernie Zenis wrote:
Do you have a solution for 10.2 (or earlier)? I don't even own 10.3.
Manipulate the text storage directly. Iterate over it by effective
ranges for NSFontAttributeName, making your changes. Be sure to call
-[NSTextView shouldChangeTextInRange:replacementString:] first, then
-[NSTextStorage beginEditing], then make your changes, then call
-[NSTextStorage endEditing] and -[NSTextView didChangeText].
Douglas Davidson
_______________________________________________
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.