Home › Forums › General XMetaL Discussion › Loading XAC in XMAX › Reply To: Loading XAC in XMAX
Reply to: Loading XAC in XMAXJuly 13, 2011 at 5:14 pm
Such a XAC file would be considered “application-level” and only XMetaL Author has this concept. In the case of XMAX any application-level code belongs in your host application (the container that you are hosting XMAX inside).
What you are trying to do (which is to try to trick the product into loading an empty file, which amounts to not loading anything) will probably cause problems because XMAX really expects to be loading a string or file (depending on the API being used). It is possible to load a document as well-formed but the scenario you are attempting (one might argue that an empty file is technically “well-formed” I guess) is not something we have designed the product to handle.
My recommendation is to move any code that should be application-level into your containing application. Probably the simplest test to decide what is “application-level” is when you answer “yes” to either of the following questions:
Does the code need to run when no documents are open?
Does the code need to be able to run regardless of which document type is open?