Reply to: Xmetal Author Exit ErrorOctober 15, 2009 at 9:14 am
My response assumed you were not the creator of the “customization”. By customization I mean the DTD or XSD and other files including the CSS and anything else, but in particular anything containing script, which would include your CTM, MCR and XFT files. We commonly call this a “customization” of XMetaL Author, in that you are adding behaviour to the product. In XMetaL Developer this is a “project” because that is what VS calls them. In the case of an author or 'user' (I would call you a developer) reinstalling the customization would mean to follow any instructions for installing these files that you as the developer or someone else that manages XMetaL installations would provide to that author (aka: user) for deploying the customization, with the assumption that one or more of their files may have problems.
As the developer of the customization I would assume you can verify the files are OK so those instructions don't really apply in your case. You may wish to ignore those instructions and concentrate on figuring out if you are referencing any ActiveX controls without cleaning them up in your scripts as that is the most likely issue that I can think of.
You will want to follow the following basic pattern when instantiating and cleaning up ActiveX controls. This may be coded differently (you may also do this with global variables in some cases allowing you to place the cleanup code in a different script from the instantiating script) but the basic idea is to always and very purposefully “null” (destroy) any references to such controls. Ideally the scripting engines should do this during their garbage collection phase, but there is no guarantee that any scripting engine will get to that at any specific moment in time and if it hasn't and a reference is still counted by XMetaL the product will refuse to close and give you the “…some unknown script is running…” error.
var fso = new ActiveXObject(“Scripting.FileSystemObject”);
//Do something with fso…
var myFile = fso.CreateTextFile(“c:\testfile.txt”, true);
myFile.WriteLine(“This is a test.”);
//Make sure the reference to fso is cleaned up…
fso = null;[/code]
Dim fso, myFile
fso = CreateObject(“Scripting.FileSystemObject”)
'Do something with fso…
MyFile = fso.CreateTextFile(“c:testfile.txt”, True)
MyFile.WriteLine(“This is a test.”)
'Make sure the reference to fso is cleaned up…
fso = nothing[/code]
I'm not sure why additional files you did not specifically add to your project would be appearing in VS 2008 in the Solution Explorer. Perhaps this is something VS 2008 does during debugging that older releases of VS do not do? I have 2005 readily available so cannot verify this immediately, but it does sound a little odd to me.