What do you think, if the commands do not chain the next command, but if they create a Undo-Command which will be put on a stack and - in case of an exception can be processed to "rollback" all commands.
I havent though about it in every detail, but if it is possible it is easier to handle - and in the case of a file-manager one could provide a undo function.


In pseudo code:

UndoStack tx = new UndoStack();
try
{
Backup(tx, ...)
Copy(tx, ...)
Move(tx, ...)
}
catch (Exception)
{
 tx.rollback(); <- process undo-stack
}

But again - [transaction] already do something like this. I think I have some time today evening to check this out.

Ciao,
Mario


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to