When inside an
Behaviour code insert, it will
often be necessary to get at data entered by the user, for example
values typed into fields. We have already mentioned that
TextField has a
value attribute. All other user-input
elements --- the other fields, menus --- have this also, and it can
be used in the same way.
It is sometimes necessary to distinguish between the characters
typed by the user and the corresponding Object Rexx value. For example,
we may want the user to be able to select the menu option
but for this to be translated to the value 0 before going into our
program. For this reason, many user-input elements also have a
display attribute. In such cases, this will be the input
actually typed or selected by the user, and the
will be the result of converting this to its final representation.
Some user-input elements also have a
dataOK attribute to indicate
whether the data was in some way invalid. An
IntegerField, for instance, will set this flag to
the string typed into it is not a valid integer.