Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Feb 19, 2020
1 parent 5d70f55 commit 28a4139
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/source/developer/ui_helpers.rst
Expand Up @@ -28,6 +28,7 @@ package within the ``InputDialog`` namespace. There are four helpers:
* ``getItem`` : request a item from a list; the list may be editable.
* ``getNumber`` : request a number; if the user input is not a valid number, NaN is returned.
* ``getText`` : request a short text.
* ``getPassword`` : request a short password.

All dialogs are built on the standard ``Dialog``. Therefore the helper functions each return
a ``Promise`` resolving in a ``Dialog.IResult`` object.
Expand Down Expand Up @@ -66,6 +67,12 @@ a ``Promise`` resolving in a ``Dialog.IResult`` object.
console.log('text ' + value.value);
});
// Request a text
InputDialog.getPassword({ title: 'Input password' }).then(value => {
console.log('A password was input');
});
File Dialogs
''''''''''''

Expand Down

0 comments on commit 28a4139

Please sign in to comment.