General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to load template in xmax

  • biswajitsr

    How to load template in xmax

    Participants 0
    Replies 1
    Last Activity 12 years, 6 months ago

    I am working in XMax. In XMetal author when user clicks on “file>new” menu then popup window opens to give the option to chose templete. How I can implement the same functionality in XMAX. I am able to open some document by hardcoded xml given in xmetal programmer's guide. I need the code to load template dynamically with user's interaction. Is it possible? if so then please give some reference. Thanks in advance.


    Derek Read

    Reply to: How to load template in xmax

    You will need to create your own “New From Template” button or menu item in your UI. When the user selects this it will run a script similar to what you run when the user clicks your “Open” button or menu item, but instead of letting the user browse for a file to open it will either open a file you consider to be a template, let the user select from one or more files you consider to be a template, or build one from a string.

    If you are letting people open an XML file as the template you may wish to have additional logic that does not allow the user to save the file back to the same location (overwriting the template). We do not restrict that in XMetaL Author — users are free to save XML documents into the Template folder in that product, which allows them to make their own templates.


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

Lost Your Password?