Undo / Redo Table view edit suggestions


I have a Table View with 13 columns. I would like to add Undo/Redo ability to these columns when editing the data cells contained in this table.

Is there an easy way to do this?

I have been thinking of creating “cache” files and saving the contents of the table when a cell value is changed. This will require a lot of code so I am hoping there is a better way.

BTW the table view exists in a document window. So users might have more than 1 document open and thus the Undo/Redo should relate to the corresponding document.

Any ideas are welcome.

Thanks !