3 ms·
I pretty much used this exact same approach to implement undo/redo in a programmer's editor and found it worked well. My code is pretty exactly as you describe
by jussij 9y ago
I pretty much used this exact same approach to implement undo/redo in a programmer's editor and found it worked well.
My code is pretty exactly as you describe, an undo and redo stack holding action objects and the interfaces to the action objects being nothing more than 'undo()' and 'redo()' methods.