General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Prevent view change to Plain Text in XMetaL Author

  • Progresso

    Prevent view change to Plain Text in XMetaL Author

    Participants 1
    Replies 2
    Last Activity 12 years, 7 months ago

    Product: XMetaL Author 4.6.12.152 SP2
    OS:  Windows XP Professional SP3, English

    Hi,

    In XMetaL Author 4.6 we have a series of document macros that record various information.  These macros are lost if the user switches to Plain Text view (and back to Tags On or Normal).

    I have tried to use On_Before_View_Change to prevent a change to Plain Text but unfortunately this event only fires when changing AWAY from Plain Text view.

    I can't use On_View_Change to solve this.

    Any ideas will be appreciated.

    Best regards
    Bo

    P.S.:  In case the problem cannot be solved now in version 4.6 I would like to know if it can be solved in in version 5.x/6.x.  I should report this to my client, since they will upgrade to the newest XMetaL version at the end of 2010.

    Reply

    Derek Read

    Reply to: Prevent view change to Plain Text in XMetaL Author

    There is a method called Application.DisablePlainTextView() which is provided for exactly this purpose. Call this method in your customization's On_Application_Open event.

    For detailed information see the XMetaL Developer Programmer's Guide topic called “DisablePlainTextView”.

    I believe this API has been available since the 2.x releases in case you are wondering about compatibility with older versions (you mention 4.6).

    Reply

    Progresso

    Reply to: Prevent view change to Plain Text in XMetaL Author

    Thanks Derek

    I was unaware of the existence of Application.DisablePlainTextView()

    I can see that it's supposed to be called from the On_Application_Open event, but this cannot be allowed in my client's case since they used the samme application settings for many users that open a variety of document types.  Some of these users might enjoy the Plain Text view so I cannot just disable it for all.

    However, I have tested Application.DisablePlainTextView() from one of the “document macros”, the On_Macro_File_Load event.  This allows me to prevent Plain Text view only for selected document types (Schemas).  It works fine in version 4.6 so I'll keep it.  Hope that it also works in version 5.x/6.x.

    You solved my problem 🙂

    Bo

    Reply

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

Lost Your Password?

Products
Downloads
Support