A code insert such as
<OnSubmit rexx> { $output~setValue( $input~getValue ) } </OnSubmit>presents two problems. One is that we want to avoid building a complete Rexx parser in order to tell where the code ends, so we take the lazy way out of enclosing the code in
{}
brackets and
scanning up to a closing }
.
The other is that the author
must be given a convenient way to refer to
WOM instances from inside the code, as in $input
and
$output
above. The convention for such paths was described
earlier, in Section 2.19. To translate these, the compiler
scans up to the first
character that can't be part of a path
(usually ~
),
converts the path to a string, and then constructs a call to the
built-in method findLocalInstanceFromPath
with this as
argument. This is called from the variable localnamebase
,
which the run-time system ensures always contains the right starting
point for path lookups.