http://www.newton-inc.com/dev/techinfo/qa/qa.htm
if value.path = '|name.first| then ... // WRONG
A: There are several concerns. '|name.first|
is not a path expression, it is a symbol with an escaped period. A proper path expression is either 'name.first
or [pathExpr: 'name, 'first]
. The vertical bars escape everything between them to be a single NewtonScript symbol.value.path = 'name.first
will always fail, because path expressions are deep objects (essentially arrays) the equal comparison will compare references rather than contents. You will have to write your own code to deeply compare path expressions.'name = [pathExpr: 'name]
will always fail, as the objects are different.'name.first
:if ClassOf(value.path) = 'pathExpr and Length(value.path) = 2 and value.path[0] = 'name and value.path[1] = 'first then ...