Reply to: Accessing the Undo StackAugust 10, 2011 at 9:32 pm
I would have to say that seems to be a hole in our APIs for XMAX. Basically, you need to be “optimistic” when designing your UI. In other words, enable the UI if ActiveDocument.Saved == false, or keep track of whether the user has saved in your part of the code. This probably also means making a decision as to whether you allow an “undo paste save” feature or not (in which case I suppose the enable/disable logic might be different or not doable, ie: always on).
Some (probably pretty advanced) ChangedNodesList monitoring could possibly get better results, though I have not tried to do anything like this.