undo, wait, nah, I liked it better before, redo it

Published 22 October 08 11:25 PM | Coding4Fun 

75102181_d8e6694ad7[1]If you’re like me, you’re constantly running into walls and doing things you shouldn’t be.  Due to this, I need the undo command on almost everything I do.  Marc Clifton has a nice, basic undo /redo framework on implementing this functionality which pretty much requires only three methods.

  • Do
    • Records current state before action has occured
  • Undo
    • Moves back to the previous state
  • Redo
    • Moves to the next state if one is there.

Before we’ve posted about doing in-memory transactions for implementing an undo/redo system.

Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

Search

This Blog

Syndication

Page view tracker