• 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: Kosher use of textView:shouldChangeTextInRange:replacementString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Kosher use of textView:shouldChangeTextInRange:replacementString?


  • Subject: Re: Kosher use of textView:shouldChangeTextInRange:replacementString?
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 9 Jan 2007 12:40:33 -0800


On Jan 9, 2007, at 12:32 PM, Peter Seibel wrote:

Is it good form to implement the textView:shouldChangeTextInRange:replacementString method in a NSTextView delegate to return NO after directly manipulating the NSTextStorage. I'm working on a simple word processor that uses some extra attributes attached to the text in the NSTextStorage for its own purposes. When text is changed in response to user actions I may need to clean up some of the attributes of surrounding text. In other cases I may also need to manipulate the text itself, inserting or removing list markers. Is this method the right place to do that. Or should I just record information here about what's changing and then clean things up in textDidChange?

Or should I do something completely different like subclass NSTextView or even NSTextStorage?

Better to record what's changing and clean things up in textDidChange.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Kosher use of textView:shouldChangeTextInRange:replacementString?
      • From: Peter Seibel <email@hidden>
References: 
 >Kosher use of textView:shouldChangeTextInRange:replacementString? (From: Peter Seibel <email@hidden>)

  • Prev by Date: Kosher use of textView:shouldChangeTextInRange:replacementString?
  • Next by Date: Re: Zero-padding an NSNumberFormatter
  • Previous by thread: Kosher use of textView:shouldChangeTextInRange:replacementString?
  • Next by thread: Re: Kosher use of textView:shouldChangeTextInRange:replacementString?
  • Index(es):
    • Date
    • Thread