ES bug after Windows update - now gone

Adobe Community Professional ,
Nov 24, 2021 Nov 24, 2021

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.

TOPICS
Scripting

Views

60

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Nov 24, 2021 Nov 24, 2021
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 =...

Likes

Translate

Translate
Adobe Employee ,
Nov 24, 2021 Nov 24, 2021

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 24, 2021 Nov 24, 2021

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 ----------------------------------------

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 24, 2021 Nov 24, 2021

Copy link to clipboard

Copied

LATEST

FYI - in Javascript, the $ object is the current script.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines