incorrect adding to undo list (continued)
Posted: Tue Aug 30, 2005 12:08 am
Sergey,
Now that the forums are back up, I wanted to continue our discussion from the private newsgroup concerning undo errors. To summarize, I have client who is getting this error when performing an undo in a document. This occurs frequently, and when it does, the document is essentially destroyed.
You mentioned that I probably had an unpaired SetUndoGroup call. I do not use that method at all. In fact, I use the code straight from the actions demo. I did find that in the demo code there was a potential to have mismatched calls as some of the actions did not have the second call to this method in a try..finally clause.
Not only did I add try..finally clauses to all the actions, but I even created a log that tracked each call to the SetUndoGroup method and when the error occured all instances were matched.
Therefore, I have verified that at least at my code level, and the level of the RichView actions, there are no mismatched method calls.
I want to do more investigation on this problem, and I need your help. The error occurs frequently enough and the results are so disasterous that I need to either solve the problem or be able to retrieve the document after this error.
There seems to be only one place this error is generated and that is in procedure TRVUndoList.AddInfo(Info: TRVUndoInfo). Is there any way that I can expose this method so I can create a "backup" of the document before the method is called, and is there a way that upon generation of this error I can restore the original document and give the user a non-fatal error message? What I would really like to do is to save a copy of the document before this method is executed so that when the error does occur I could send the document to you for evaluation.
Any help you can provide is greatly appreciated. I am willing to do as much of the investigative work as possible on my own, but I will need your help in some areas.
Thank you very much.
Now that the forums are back up, I wanted to continue our discussion from the private newsgroup concerning undo errors. To summarize, I have client who is getting this error when performing an undo in a document. This occurs frequently, and when it does, the document is essentially destroyed.
You mentioned that I probably had an unpaired SetUndoGroup call. I do not use that method at all. In fact, I use the code straight from the actions demo. I did find that in the demo code there was a potential to have mismatched calls as some of the actions did not have the second call to this method in a try..finally clause.
Not only did I add try..finally clauses to all the actions, but I even created a log that tracked each call to the SetUndoGroup method and when the error occured all instances were matched.
Therefore, I have verified that at least at my code level, and the level of the RichView actions, there are no mismatched method calls.
I want to do more investigation on this problem, and I need your help. The error occurs frequently enough and the results are so disasterous that I need to either solve the problem or be able to retrieve the document after this error.
There seems to be only one place this error is generated and that is in procedure TRVUndoList.AddInfo(Info: TRVUndoInfo). Is there any way that I can expose this method so I can create a "backup" of the document before the method is called, and is there a way that upon generation of this error I can restore the original document and give the user a non-fatal error message? What I would really like to do is to save a copy of the document before this method is executed so that when the error does occur I could send the document to you for evaluation.
Any help you can provide is greatly appreciated. I am willing to do as much of the investigative work as possible on my own, but I will need your help in some areas.
Thank you very much.