Undo in textbox?

BlitzMax Forums/BlitzMax Programming/Undo in textbox?

ozak(Posted 2005) [#1]
Is there some kind of undo/redo support in the TextArea gadget? Or do I have to do it myself, and if yes what is the easiest way? Should I just add to the undo buffer on all keyevents or what?


FlameDuck(Posted 2005) [#2]
Should I just add to the undo buffer on all keyevents or what?
Well keyevents might not do you as much good, as you're likely to want to undo changes to the text, not the actual keypresses.

There a design pattern called the "Command Pattern" which, amougst other things, solves the undo problem rather elegantly.