Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Invalid property does not create an error

$
0
0

Dear experts,
In a script inserting a marker I had a typo on line 08:

function InsertMarker (oTtextRange, sMarkerName, sMarkerText ) {
var j, textLoc, marker, markerType, thisId, thatId, lenMarkerArray;  textLoc = oTtextRange.end;                      // inserted at end of selection  markerType = GetMarkerType (goCurrentDoc, sMarkerName); // Get the specified marker type.     if (markerType.ObjectValid ()) {       marker = goCurrentDoc.NewAnchoredMarker (textLoc);       marker.MarkerTypeId = markerType;           // properties of marker      marker.sMarkerText = sMarkerText;       thisId = marker.Unique;                     // to find it in the updated array  }
// ...
}

Line 08 should read:

marker.MarkerText = sMarkerText;

Hence the marker was inserted with empty content.

It seems that an invalid property is just ignored. Are there no checks for invalid properties?

 

Klaus


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>