Maplets[Elements]
RunDialog
display a dialog
Calling Sequence
Parameters
Description
Examples
RunDialog(opts)
opts
-
equation(s) of the form dialog=value; specify options for the RunDialog element
The RunDialog command element displays a dialog defined in the running Maplet application. To display a dialog defined in a different Maplet application, use the Display function.
There are separate RunDialog and RunWindow command elements because the Window element is intrinsically different from the dialog elements. A dialog has a predefined structure. A Maplet application author can specify options for a dialog, but cannot add elements. A window does not have a predefined structure. A Maplet application author specifies its structure by using elements and options. Also they behave differently. For example, a window can be minimized.
To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.
Elements, Symbols, or Types
Assumed Option or Content
name or string
dialog option
A RunDialog element cannot contain other elements.
A RunDialog element can be contained in a Maplet element; in an equation for the onapprove, oncancel, onchange, onclick, ondecline, or onstartup option for an element; or wrapped in an Action element as a parameter in an element that accepts an onchange or onclick option without an equation.
The following table describes the control and use of the RunDialog element options.
An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
An x in the R column indicates that the option is required in the calling sequence.
An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.
Option
I
R
G
S
dialog
x
The opts argument can contain one or more of the following equations that set Maplet application options.
dialog = reference to a dialog element (name or string)
A reference to the dialog to run.
In this Maplet application, the RunDialog element starts a dialog in the same Maplet application.
with⁡MapletsElements:
maplet≔Maplet⁡Window⁡TextFieldTF1⁡,Button⁡Differentiate with respect to x,Evaluate⁡TF1=diff⁡TF1,x,Button⁡Help,RunDialog⁡MD1,Button⁡Exit,Shutdown⁡TF1,MessageDialogMD1⁡See ?diff for help with the differentiation command:
MapletsDisplay⁡maplet
In this Maplet application, the Display function starts another Maplet application that contains a dialog.
maplet1≔Maplet⁡Window⁡TextFieldTF1⁡,Button⁡Differentiate with respect to x,Evaluate⁡TF1=diff⁡TF1,x,Button⁡Help,Evaluate⁡function=MapletsDisplay⁡maplet2,Button⁡Exit,Shutdown⁡TF1:
maplet2≔Maplet⁡MessageDialog⁡See ?diff for help with the differentiation command:
MapletsDisplay⁡maplet1
See Also
diff
Maplets/CommandElements
Maplets/DialogElements
Maplets[Display]
Maplets[Elements][Action]
Maplets[Elements][AlertDialog]
Maplets[Elements][Button]
Maplets[Elements][ColorDialog]
Maplets[Elements][ConfirmDialog]
Maplets[Elements][Evaluate]
Maplets[Elements][FileDialog]
Maplets[Elements][InputDialog]
Maplets[Elements][Maplet]
Maplets[Elements][MessageDialog]
Maplets[Elements][QuestionDialog]
Maplets[Elements][RunWindow]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][TextField]
Maplets[Elements][Window]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
Download Help Document