This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathanswer-folder.lcdoc
More file actions
78 lines (55 loc) · 2.48 KB
/
answer-folder.lcdoc
File metadata and controls
78 lines (55 loc) · 2.48 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
Name: answer folder
Synonyms: answer directory
Type: command
Syntax: answer folder <prompt> [with <defaultPath>] [titled <windowTitle>] [as sheet]
Summary:
Displays a <file dialog box|standard file dialog> for the user to choose
a <folder>.
Introduced: 1.0
OS: mac, windows, linux
Platforms: desktop
Security: disk
Example:
answer folder "Please choose a folder:"
Example:
if it is empty then answer folder chooseMsg as sheet
Example:
answer folder "Where is the data?" with "../data_stacks/recent"
Parameters:
prompt (string):
If you specify empty, no prompt appears.
defaultPath:
The name and location of the folder whose contents are listed when the
<dialog box> appears. If no defaultPath is specified, the <dialog box> lists
the contents of the last <folder> you used with a <file dialog box>.
windowTitle:
If specified, appears in the title bar of the dialog box.
If no <windowTitle> is given, the title bar is blank. This parameter
has no effect on macOS 10.11 (El Capitan) and above, so make sure that any important information is placed in the <prompt> parameter.
It:
The absolute file path of the <folder> the user selects is placed in the
<it> <variable>.
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 <answer folder> <command> when you want the user to choose a
<folder> --for example, as a destination for <export|exported> <files>.
If the 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.
To give a <dialog box> a prompt when using the as sheet form a non-empty
title must be provided. This will cause the prompt to appear in the same
place it would if as sheet was not being used.
If the systemFileSelector <property> is set to false, LiveCode's
built-in <dialog box> is used instead of the operating system's
<file dialog box|standard file dialog>.
Changes:
The answer folder...as sheet form was introduced in version 2.0.
References: answer file (command), revDeleteFolder (command),
result (function), files (function), property (glossary),
return (glossary), variable (glossary), modal dialog box (glossary),
export (glossary), file dialog box (glossary), folder (glossary),
command (glossary), dialog box (glossary), it (keyword)
Tags: file system