Isn't a text selection not an object?
Dear all,
I tried to check for an existing text selection:
var oDoc = app.ActiveDoc;
var oTSel = oDoc.TextSelection;
if (oTSel.ObjectValid()) {
$.writeln ("we got it");
}
But this creates an error during parsing.
I need to dive deeper into the object:
var oDoc = app.ActiveDoc;
var oTSel = oDoc.TextSelection;
if (oTSel.beg.obj.ObjectValid()) {
$.writeln ("we got it");
}
This works - but I do not understand, why the text selection itself - which is indicated to be an object - does not allow a direct check.

