forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathask-password.lcdoc
More file actions
82 lines (59 loc) · 2.54 KB
/
ask-password.lcdoc
File metadata and controls
82 lines (59 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Name: ask password
Type: command
Syntax: ask password [clear] <question> [with <defaultResponse>] [titled <windowTitle>] [as sheet]
Summary:
Displays a <dialog box> like the <ask> <command>, but with the
characters the user types displayed as asterisks (*) for privacy.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, mobile
Example:
ask password "Please enter password"
get mcEncrypt(it)
Example:
ask password "Please log in." titled "Millenium Group Intranet"
Example:
ask password empty with savedPassword as sheet
Example:
ask password "Please log in:" with "PASSWORD" titled "Password Test"
Parameters:
question (string):
The string to display as a prompt above the password entry box.
windowTitle:
If specified, appears in the title bar of the dialog box. If no
windowTitle is given, the title bar is blank.
defaultResponse:
Placed in the text box when the dialog box appears. If no
defaultResponse is specified, the text box is empty when the dialog box
appears.
It:
The text contents of the text box is placed in the it <variable>. If the
ask password clear form is used, the text box is not encrypted, and the
it <variable> contains whatever the user entered (this is the default
behavior).
The result:
If the user cancels the <dialog box|dialog>, the <it> <variable> is set
to empty, and the <result> <function> <return|returns> "cancel".
Description:
Use the <ask password> <command> to provide privacy for the information
the user types. For example, if the user is in a public place, the
information might be seen by someone looking over his or her shoulder.
This command does not <encrypt> the text the user types, but you can use
<ask password> to implement a secret <password> with the syntax shown in
the example section.
If the ask password...as sheet form is used, the dialog box appears as a
sheet on OS X systems. On other systems, the as sheet form has no effect
and the dialog box appears normally. Attempting to open a sheet from
within another sheet displays the second stack as a <modal dialog box>
instead.
>*Note:* Android and iOS do not support 'as sheet'.
Changes:
'ask password clear' set to the default behavior at version 6.0.0 to
provide compatibility across all platforms.
The 'ask password...as sheet' form was introduced in version 2.0.
References: ask (command), function (control structure),
result (function), mcEncrypt (function), modal dialog box (glossary),
dialog box (glossary), variable (glossary), command (glossary),
return (glossary), encrypt (glossary), it (keyword),
password (property)
Tags: windowing