Possible Duplicate:
Design Pattern for Undo Engine
In general, how do you deal with supporting an "undo" feature in your application? I have worked on web apps and desktop apps alike, and I have never really felt comfortable with any "undo" system I've made.