TextValidator validates text controls, providing a variety of filtering behaviours.
For more information, please see Validator overview.
Validator overview, Validator, GenericValidator
TextValidator.new(TextValidator validator)
Copy constructor.
TextValidator.new(Integer style = FILTER_NONE, String valPtr = nil)
Constructor, taking a style and optional pointer to a String variable.
| FILTER_NONE | No filtering takes place. |
| FILTER_ASCII | Non-ASCII characters are filtered out. |
| FILTER_ALPHA | Non-alpha characters are filtered out. |
| FILTER_ALPHANUMERIC | Non-alphanumeric characters are filtered out. |
| FILTER_NUMERIC | Non-numeric characters are filtered out. |
| FILTER_INCLUDE_LIST | Use an include list. The validatorchecks if the user input is on the list, complaining if not. See TextValidator#set_includes. |
| FILTER_EXCLUDE_LIST | Use an exclude list. The validatorchecks if the user input is on the list, complaining if it is. See TextValidator#set_excludes. |
| FILTER_INCLUDE_CHAR_LIST | Use an include list. The validatorchecks if each input character is in the list (one character per list element), complaining if not.See TextValidator#set_includes. |
| FILTER_EXCLUDE_CHAR_LIST | Use an include list. The validatorchecks if each input character is in the list (one character per list element), complaining if it is.See TextValidator#set_excludes. |
Validator clone()
Clones the text validator using the copy constructor.
ArrayString get_excludes()
Returns a reference to the exclude list (the list of invalid values).
ArrayString get_includes()
Returns a reference to the include list (the list of valid values).
Integer get_style()
Returns the validator style.
on_char(KeyEvent event)
Receives character input from the window and filters it according to the current validator style.
set_excludes(ArrayString stringList)
Sets the exclude list (invalid values for the user input).
set_includes(ArrayString stringList)
Sets the include list (valid values for the user input).
set_style(Integer style)
Sets the validator style.
Boolean transfer_from_window()
Transfers the value in the text control to the string.
Boolean transfer_to_window()
Transfers the string value to the text control.
Boolean validate(Window parent)
Validates the window contents against the include or exclude lists, depending on the validator style.
[This page automatically generated from the Textile source at Fri Oct 31 16:06:53 +0000 2008]