• 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: controlling nstextview undo's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: controlling nstextview undo's


  • Subject: Re: controlling nstextview undo's
  • From: Pete Yandell <email@hidden>
  • Date: Thu, 7 Aug 2003 11:13:46 +1000

On Thursday, August 7, 2003, at 04:00 AM, Matthew Weinstein wrote:

In my app, based on user choices I grab the textStorage of an nstextview; modify it (add text, attributes, etc.) update it (didChangeText) and then modify the selection. When I undo I get a very odd mix of modifications. Some of the text is chopped as well as my additions. Is there a way to set the start and end of the undogroup for an nstextview?

Can you be more specific about the changes you're making and when you're making them? It sounds like you're doing something along the lines of autocompletion when the user is typing, but I could be reading that wrongly.

NSTextViews (with undo enabled using setAllowUndo:) do some strange things with the undo manager. For example, they'll often go back and modify the last undo event on the stack (using undocumented APIs in the undo manager) when a key is pressed.

Pete Yandell
http://pete.yandell.com/
_______________________________________________
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: 
 >controlling nstextview undo's (From: Matthew Weinstein <email@hidden>)

  • Prev by Date: Re: [OT] Mac OS X market share vs. Mac OS 9...
  • Next by Date: Any CodeWarrior users running with Panther?
  • Previous by thread: controlling nstextview undo's
  • Next by thread: Re: NSSavePanel and setting extensions... (SOLVED)
  • Index(es):
    • Date
    • Thread