Browse Source

Add documentation

Sylvain Corlay 5 years ago
parent
commit
28a4139d0d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      docs/source/developer/ui_helpers.rst

+ 7 - 0
docs/source/developer/ui_helpers.rst

@@ -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.
@@ -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
 ''''''''''''