Copy link to clipboard
Copied
Not all problems with FM are the result of an error in FrameMaker as the following eposide tells:
On Friday, November 19 I had this effect in a script function, which until then worked without problems (snippet around the problem):
$.writeln (sNewMtype); // "comment"
if (sNewMtype != undefined) {
$.writeln (sNewMtype); // → sNewMtype is undefined
}
Then, on Monday, November 22 I wanted to post this as an error in FM - verifying the situation again, all was OK!
From Klaus Göbel I heard that he had a similar problem around the same time with a global variable, which suddenly wasn't global any more. He assumed a Windows update (in my case it was on Fri 2021-11-12). IMHO he was right with this assumption - and Windows was fixed after the 19th again with a hidden update - which is not recognisable.
Stefan,
I provided only the relevant part of the script where the error was reported by ESTK. The whole function is this
KLD_M.ModifyMarker = function (oMarker, sNewMtype, sNewMtext ) { // =====
var oDoc, oNewMtype;
oDoc = app.ActiveDoc;
if (sNewMtype != undefined) {
oNewMtype = oDoc.GetNamedMarkerType (sNewMtype);
if (!oNewMtype.ObjectValid()) {return undefined; }
oMarker.MarkerTypeId = oNewMtype;
return oMarker;
}
if (sNewMtext != undefined) {
oMarker.MarkerText =
...
Copy link to clipboard
Copied
Strange. However, in your code neither $ or sNewMtype are defined anywhere. Therfore any parser will give you an uncaught reference Error that sNewMtype is not defined.
Copy link to clipboard
Copied
Stefan,
I provided only the relevant part of the script where the error was reported by ESTK. The whole function is this
KLD_M.ModifyMarker = function (oMarker, sNewMtype, sNewMtext ) { // =====
var oDoc, oNewMtype;
oDoc = app.ActiveDoc;
if (sNewMtype != undefined) {
oNewMtype = oDoc.GetNamedMarkerType (sNewMtype);
if (!oNewMtype.ObjectValid()) {return undefined; }
oMarker.MarkerTypeId = oNewMtype;
return oMarker;
}
if (sNewMtext != undefined) {
oMarker.MarkerText = sNewMtext;
return oMarker;
}
} //--- end ModifyMarker ----------------------------------------
Copy link to clipboard
Copied
FYI - in Javascript, the $ object is the current script.