What should an undo/redo mechanism do ?

J. Landman Gay jacque at hyperactivesw.com
Sun Mar 18 22:10:25 EDT 2012


On 3/18/12 7:13 PM, Alex Tweedly wrote:

> 1. the result (if any) of doing a 'save'.
> Should the undo history get wiped when the user saves a document ?
> (i.e. I can undo back as far as the last save, and no further)
> Or should I be able to undo all the way to the start of this session ?
> Or, indeed, should I store the undo history with the 'save', so that I
> can undo all the way back to the creation of the document ?

If your app isn't Photoshop, it's pretty universal to go back only to 
the last save. I've never seen any app save undo history forever.

> 2. Does inserting multiple characters count as a single event for
> undo-ing ?
> Let's say I click somewhere in a doc, and then type "a" "b" "c" (i.e. abc)
> If I then undo, should it remove just the 'c', or all 3 chars ('abc') ?

Most the apps I use consider a mouseclick to be the defining point. Undo 
removes everything since the text selection was last changed.

> 3. Is the intent to undo user actions, or to undo events that affect a
> document ?
>
> For instance, if I type 'a' 'b' "Italics" 'c' "undo" should I be left in
> italic or normal insertion mode ?
> Should a subsequent "undo" then simply change the insertion mode, or
> should it remove the "ab" ?

If you're taking out everything since the last text selection, then I'd 
say the styling should go too.

>
> 4. Should I stop worrying about this and just do any one of the above -
> users are grateful for any system that let's them undo multiple times
> and will get used to it :-)

Pretty much, yeah.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list