General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Save (Ctrl +S) button status (enable/disable).

  • wongsk27

    Save (Ctrl +S) button status (enable/disable).

    Participants 0
    Replies 1
    Last Activity 13 years, 1 month ago

    Hi all,

          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

       
      ActiveDocument.Range.PasteStringAsText(“Test”);
      ActiveDocument.Save();
      Application.Alert(“Document Saved”);
    ]]>

    -Brian

    Reply

    Derek Read

    Reply to: Save (Ctrl +S) button status (enable/disable).

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support