How to implement Undo and Redo
Posted: Wed Apr 21, 2010 4:17 pm
Under programming techniques, this is called memento design pattern which we used to implement "undo" & “Redo” functionality on the application.
In simple terms, this is about storing every action into a collection of actions. Then everything the user does, throw it on the list/collection of actions, then do the action of the last item on the list.
Now you have an ordered list of specific actions the user did, and you can go back and forth or even all the way to the beginning but undoing all actions backwards.
Read more here
In simple terms, this is about storing every action into a collection of actions. Then everything the user does, throw it on the list/collection of actions, then do the action of the last item on the list.
Now you have an ordered list of specific actions the user did, and you can go back and forth or even all the way to the beginning but undoing all actions backwards.
Read more here