Turns off a widget's error
state
- You can also use the field function, errorOff function, or errorOff
statement to turn a widget's error attribute off. However, only the _errorOff
method can be executed from another Frame, SCL, or Program entry. For example,
if you override the _validate method for a subclass of the TextEntry class,
the _validate method can turn off the error attribute without knowing the
field name.
- For extended table widgets, you can disable the error flag for
a particular row of the extended table and for any widget in the extended
table. For more information, refer to _errorOff in the ExtendedTable class.
- Generally, when a field is modified, you will unconditionally
turn off the error attribute, perform validation, and turn on the error attribute
only if the validation fails.
- If any widget has its error attribute set when an END command
is issued, afsw does not execute any widget _preterm methods or the TERM label,
and the END command does not end the Frame entry. You must issue the CANCEL
command instead.
Example
Use the following statement at the beginning of an overridden _validate
method to turn off a text entry's error attribute before performing any validation:
_self_._errorOff();
/* perform validation... */
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.