• 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: Always send shouldChangeTextInRange:... ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Always send shouldChangeTextInRange:... ?


  • Subject: Re: Always send shouldChangeTextInRange:... ?
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 6 Feb 2004 12:56:09 -0800

On Feb 6, 2004, at 12:31 PM, Fritz Anderson wrote:

Recent cocoa-dev messages made me aware of the NSTextView messages shouldChangeTextInRange:replacementString: and didChangeText. I haven't been calling them, and I wonder if I must. Specifically,

- Are they necessary to the proper and efficient functioning of the text system, as are begin/endEditing? That is, is it an affirmative bug not to call them? I don't see any bugs or deficiencies in the application that seem to come from the omission.

- My own code doesn't rely on any delegation or notifications from the text system. Does that make the calls omissible?

- What I've read seems to imply that shouldChange... and didChange... are most relevant to the effects of _user_ edits to the text. The changes to my text storage, as I say, are all autonomous and not (for instance) refusable or undoable. Do the calls just add infrastructure for functionality I don't use?

These calls are intended for user changes to the text, and they serve to allow the delegate to be called and the undo mechanism to be invoked. They are not intended to be used for purely programmatic changes.

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.

References: 
 >Always send shouldChangeTextInRange:... ? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Always send shouldChangeTextInRange:... ?
  • Next by Date: Class variable?
  • Previous by thread: Always send shouldChangeTextInRange:... ?
  • Next by thread: Class variable?
  • Index(es):
    • Date
    • Thread