Home Forums General XMetaL Discussion Using Xmetal Developer 9.0 w/MVS 2015 to debug xft Reply To: Using Xmetal Developer 9.0 w/MVS 2015 to debug xft

russurquhart1

Reply to: Using Xmetal Developer 9.0 w/MVS 2015 to debug xft

Hi Derek,

I just tried your suggestion on Xmetal 10.0, and it seemed to have no effect! fwiw, here is the contents of the xft that gets executed on the OnInnitialize event. I gen an error starting with  the third line and any line that references the ActiveDocument.

function TheView_OnInitialize(){

if (curView != 1)
{
ActiveDocument.ViewType=1;
}

// Return to start of document and get all target values
docRange.MoveToDocumentStart();
var nextFound = docRange.MoveToElement ();
while (nextFound)
{
if (docRange.hasAttribute(“Target”))
{
if (docRange.ContainerAttribute(“Target”) != “”)
{
// store value of Target attribute
tVal[tI] = docRange.ContainerAttribute(“Target”);
tI = tI + 1;
}
}
if (docRange.ElementName(0)== “CrossReference”)
{
if (docRange.ContainerAttribute(“href”) != “”)
{ // select the current element & store href val and location
hrefVal[hrefI] = docRange.ContainerAttribute(“href”).substring(1);
hrefLoc[hrefI] = docRange.ContainerNode;
hrefI = hrefI + 1;
}
}
//move to next element
        nextFound = docRange.MoveToElement();
}
findMissing();
if (!hrefMiss)
{
Application.Alert(“No missing target values for cross references found.”);
TheView.Cancel();
ActiveDocument.ViewType = curView;
}

This javascript is still valid for Xmetal versions after 6.0, right?

Reply

Products
Downloads
Support