Invalid property does not create an error
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

