General XMetaL Discussion
wongsk27 October 2, 2009 at 6:17 am
Save (Ctrl +S) button status (enable/disable).October 2, 2009 at 6:17 amParticipants 0Replies 1Last Activity 12 years, 9 months ago
I am a bit confuse on the behaviour of Save (Ctrl +S) button in XMetaL 5.5. I have written a macro to use PasteStringAsText function to paste some text into the document and save the document using ActiveDocument.Save();. I was expected the Save (Ctrl +S) button will be disabled after the ActiveDocument.Save() operation, however, it is not the case. It is still shown as enable. Can anybody expain to me the actually behaviour of Save (Ctrl +S) button when I use ActiveDocument.Save() the document? The following is the macro I use to test the save operation. and I am using the journalist to create the document. Thanks
-BrianDerek Read October 7, 2009 at 9:48 pm
Reply to: Save (Ctrl +S) button status (enable/disable).October 7, 2009 at 9:48 pm
This was dealt with as a support case, but others may wish to see that response so I'm copying it here FYI…
This is a known issue. However, there is some dispute about how we will ultimately address this. The issue has come about due to the implementation in our 5.0 release of a feature that allows people to Undo after saving and also after examination of other commonly used products (Word 2007 and others) that never disable the Save functionality (allowing people to save whenever they wish even when a document has been saved).
The present thinking is that we may not “fix” the API in question, the issue being related to the property ActiveDocument.Saved = true. Setting this property (which is also done when a successful call to ActiveDocument.Save() completes) does not disable the Save button and the File Save menu item as one might expect it to.
Instead, we are contemplating whether it makes sense to permanently enable the Save button and the File>Save menu item, meaning that the “bug” is that these items are disabled when the user manually saves the document by pressing Ctrl+S or selects either File>Save or the Save button.
In the meantime, I can think of no workaround to your issue (which is that the user will see different behavior depending on which way they save the document; through the standard user interface or via your script).
If you have a preference please let me know (ideally with an argument for your preference) and I will communicate it to our development team.
Note that if you have both a custom button / menu item and a custom macro for saving you can use the PushInMacro() or DisableMacro() APIs in this case.
- You must be logged in to reply to this topic.