When a document is saved my beforeSave event handler changes the doc a bit then the afterSave undoes the change (long story described in another thread). Undoing the changes with afterSave puts the doc back to how it was before the save occured, but ID thinks that the doc is not changed and wants to save it again. With this strategy the doc is never in a "saved" state.
the Document.modified property is read only. Is there any way to forcibly change it to false? I was able to set myDoc.properties.modified to false without error, but either it was not changed or immediately overridden with 'true'.
Is there any way to do this?
Thank you for your reply, Marijan. In my case reverting to the saved copy won't work. I mark up the document in a way to preserve a state of the document for the save. When I open the doc later my script resets the state of the document which is what causes the modified flag to change to true. THerefore reverting the doc would result in modified = true.
I describe what I am trying to do here: http://forums.adobe.com/message/5760168#5760168
But thus far I appear to be blocked from achieving my goal. It seems silly that such a powerful app such as ID is unable to facilitate such an obvious need.
Thanks for your help.