I have a problem understanding why the interpreter does not accept this:
Object co = current Object Object o = object(co."Absolute Number")
The error is: "incorrect arguments for function (object)" /
"incorrectly concatenated tokens". I verified that the type returned by
co."Absolute Number" matches the expectation of
Object object(int absno[, Module m]) as it was declared according to the DXL manual:
print type(co."Absolute Number")
which prints "Integer". Appears to be fine, but obviously, it is not.
It is not a problem of that particular attribute.
co."Object Text" should return a string, but with that attribute as well, the interpreter does not recognize the data type.
Adding brackets at various places does not help. Trying to explicitly convert the returned attribute value to integer does not help. What helps is storing the returned value to an integer variable:
Object co = current Object int no = co."Absolute Number" Object o = object(no)
which I do not like because it introduces unused variables. What works as well is to use the standard string approach: convert the attribute value to string and then (back) to integer:
Object o = object(intOf(co."Absolute Number" ""))
but that is rather hacky for me. What did I overlook?