Re: Undo grouping question
Re: Undo grouping question
- Subject: Re: Undo grouping question
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 14 Mar 2002 05:40:40 -0500
on 02-03-13 5:16 PM, Douglas Davidson at email@hidden wrote:
>
On Wednesday, March 13, 2002, at 01:51 PM, Bill Cheeseman wrote:
>
>
> It would help if I understood what is triggering the opening of a new
>
> undo
>
> group, so here's the QUESTION: How does NSTextView decide when it needs
>
> to
>
> open a new undo group?
>
>
Well, text undo does some odd things, but the basic criteria are that
>
typing and deleting without an intervening change of selection should be
>
considered as a single operation for undo. It's a bit hairy, though, so
>
I expect you might have problems overriding it. We do hope to clean it
>
up at some point in the future...
Thanks for the info. That means, basically, that I must give up on applying
live undo and redo to a text field that has an on-the-fly formatter
connected.
Overnight, I realized that opening a new undo group is only a symptom. The
actual problem is that changes to the text field are not properly recorded
by the undo manager when a connected formatter inserts or deletes separator
characters. I don't suppose there's any way for me to hack my formatted
string into the top of the undo stack in place of the wrong information that
is there, each time I come out of my formatter's isPartialStringValid:...
method? (And fool the system into not opening a new undo group?)
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.