dialogData

Specifies data to be pass to a dialog box.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

set the dialogData to string

# Examples

set the dialogData to "OK"

put last item of the dialogData into buttonReceived

# Description

Use the dialogData property to pass data between a dialog box and the stack that opens the dialog box.

The dialogData can be used for any data you wish to place in it. For example, you can use it within a modal dialog box stack to hold the name of the button the user clicked, the state of other options that are set in the dialog box, the contents of text fields the user filled in, and any other information. The handler that showed the dialog box can then use the information in the dialogData. The caller can also place information--for example, default settings--into the dialogData property, and the modal dialog box stack can use that information to set up the dialog box when it opens.

Since the dialogData property is global and can be set or accessed by any stack, this method generally creates simpler code than the alternatives (such as using global variables, or pass parameters between stacks).

>*Tip:* The built-in "Answer Dialog" and "Ask Dialog" stacks, which are > used by the ask and answer commands, use the > dialogData property to pass data between the development environment> and the dialog box. To see the scripts used > for these stacks, enter one of the following statements > into the message box:

edit the script of card 1 of stack "Answer Dialog" edit the script of card 1 of stack "Ask Dialog"

# Tags

# See

- **property:** default - **control structure:** pass - **keyword:** default, button, string, message box - **object:** stack, field - **glossary:** script, variable, handler, property, dialog box, development environment, modal dialog box, command, caller, parameter, statement, pass - **command:** answer, ask, modeless, global - **function:** stacks