Error getting tags :
error 404Error getting tags :
error 404 answer folder | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
answer folder
Basics
Expander triangle
Type
Command
Syntax

answer folder prompt [with defaultPath] [as sheet]

Introduced
1.0
Changed
2.0
Environment
Desktop,Web
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Displays a standard file dialog for the user to choose a folder.
Examples

answer folder "Please choose a folder:"
if it is empty then answer folder chooseMsg as sheet
answer folder "Where is the data?" with "../data_stacks/recent"

Additional Comments
Expander triangle

Use the answer folder command when you want the user to choose a folder--for example, as a destination for exported files.

Parameters:

The prompt is a string (or any expression that evaluates to a string). If you specify empty, no prompt appears.

The defaultPath is 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.

Comments:

The absolute file path of the folder the user selects is placed in the it variable. If the user cancels the dialog, the it variable is set to empty, and the result function returns "cancel".

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, Revolution's built-in dialog box is used instead of the operating system's standard file dialog.

Changes to Revolution:

The answer folder...as sheet form was introduced in version 2.0.

User Comments
Expander triangle