Class: UIAlphaDialog

UIAlphaDialog

Provides a configurable dialog to prompt the user for a string value.


Mixes In:
Example
var ui = $wat.load('ui')[0];
var strDlg = ui.dialogs.getString;
strDlg.title = 'Enter a string';
var result = strDlg.exec();
if (result != null) console.log('User entered: ' + result);
else console.log('User canceled');

Members


password :bool

Gets/sets whether values entered by the user will be replaced by '*' on the screen. Typically used for entering passwords or other sensitive information that otherwise could be seen on the screen.

Type:
  • bool
Since:
  • 1.0
Default Value:
  • false

validator :string

Gets/sets the regular expression used to validate the user input. Default is no validator.

Type:
  • string
Since:
  • 1.0
Examples
// get one or more non-whitespace characters from the user
dialog.validator = "\\S+";
// get a string that is A, B or C followed by exactly five digits followed by W, X, Y or Z
dialog.validator = "[A-C]\\d{5}[W-Z]"