Re: controlling nstextview undo's
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.