[PSFT] (upgrading to 8.5X / 9.2) Building an Undo Stack
Just curious if anyone has ever implemented an UNDO stack. The way these work is you use the command pattern, where every Button press (and save) stores the current and prior state of the component along with code to restore the prior state.
- User changes some data and clicks save/button
- Custom logic saves data changed, and saves results of action
- User clicks undo
- Custom logic looks at a stack of commands (the save, the things modified by the button (e.g., workflow, other things) and runs custom "reverse" logic