how could one implement UNDO function like in photoshop or paint shop pro, i mean in photoshop u got some really 'smart' undo..you can go back even if u make 100 moves, u can even sort and move just that moves that you want, how is this done? i mean you can go 100 moves back etc and it is memory efficent...i cant find this anywhere, can u help?
In many cases it depends on the type of program. Sometimes you can have an opposite for the action just done, other times save lost data to a temp file on disk. Just keep a stack of the changes and pop the action done, and reverse it's effect. Some programs keep track of the dependancies of actions and let you UNDO out of order. Hope that helps, bitRAKE