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

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.

  • Follow-Ups:
    • Re: Changing font stuff in NSTextView + Undo
      • From: Bernie Zenis <email@hidden>
References: 
 >Re: Changing font stuff in NSTextView + Undo (From: Bernie Zenis <email@hidden>)

  • Prev by Date: Re: Disabling_Expose_for_some_windows,_some_day?
  • Next by Date: Re: NSIndexSet
  • Previous by thread: Re: Changing font stuff in NSTextView + Undo
  • Next by thread: Re: Changing font stuff in NSTextView + Undo
  • Index(es):
    • Date
    • Thread