ask | ||||||||||||||||
Type | command | |||||||||||||||
Dictionary | LCS | |||||||||||||||
Library | LiveCode Script | |||||||||||||||
Syntax |
| |||||||||||||||
Summary | Displays a dialog box with a prompt, a text box for the user to enter a response, and OK and Cancel buttons. | |||||||||||||||
Introduced | 1.0 | |||||||||||||||
Changes | The ability to specify an iconType was added in version 2.0. In previous versions, no icon was displayed. | |||||||||||||||
OS | mac, windows, linux, ios, android | |||||||||||||||
Platforms | desktop, mobile | |||||||||||||||
Parameters |
| |||||||||||||||
Example |
| |||||||||||||||
Values |
| |||||||||||||||
Related | Keyword: gRevAppIcon, it, gRevProfileReadOnly, gRevSmallAppIcon Property: dialogData, HTMLText Command: answer, ask file, ask password, modal, sheet, ask file with type Function: result Control Structure: function Glossary: return, OS X, variable, handler, modal dialog box, dialog box, command, HTML | |||||||||||||||
Description | Use the ask command when a handler needs to get information from the user before continuing. If the ask...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. You can format the prompt text using HTML-style tags as described in the HTMLText property. *Cross-platform note:* On OS X systems, there is no image for the question icon. Therefore, the information icon appears instead. In addition, the image specified by the gRevAppIcon appears if you do not specify an iconType. If you specify an iconType, the image specified by the gRevSmallAppIcon appears instead, along with the standard icon specified by the iconType. *Cross-platform note:* Mobile does not support iconType and 'as sheet'. The ask...as sheet form was introduced in version 2.0. The ability to provide formatted text for the prompt was introduced in version 2.0. |