Pages: 1
Print
Author Topic: How to load template in xmax  (Read 1984 times)
biswajitsr
Member

Posts: 44


« on: July 21, 2010, 03:44:44 AM »

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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2507



WWW
« Reply #1 on: July 21, 2010, 11:31:13 AM »

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.
Logged
Pages: 1
Print
Jump to:  

email us