DialogInput

DialogInput[expr]

interactively puts up expr as a dialog notebook, waits until a DialogReturn[e] is evaluated from within it, and then returns the result e.

DialogInput[{x=x0,y=y0,},expr]

sets up local variables x, y, in expr.

Details and Options

  • The Wolfram Language kernel in which DialogInput is evaluated will block until the DialogReturn in the dialog is evaluated.

Examples

open allclose all

Basic Examples  (1)

Scope  (2)

Use a dialog input window to set a variable:

Enter some text in the field and click Proceed to set res:

Set res to True or to False, depending which button is clicked:

Properties & Relations  (5)

This uses DialogReturn[] to return from the dialog notebook:

DefaultButton[] can be used instead of an explicit DialogReturn[]:

CancelButton[] implicitly uses DialogReturn[$Canceled]:

Input[] puts up a special dialog window for entering an expression:

InputString[] puts up a special dialog window for entering a string:

Possible Issues  (1)

DialogInput blocks the queued evaluation channel, preventing queued controls from working:

Some values of SynchronousUpdating also use the queued channel and are blocked:

For Manipulate, the default value of SynchronousUpdating must be changed for it to work:

Scheduled tasks might not run while the queued evaluation channel is blocked:

Wolfram Research (2007), DialogInput, Wolfram Language function, https://reference.wolfram.com/language/ref/DialogInput.html.

Text

Wolfram Research (2007), DialogInput, Wolfram Language function, https://reference.wolfram.com/language/ref/DialogInput.html.

BibTeX

@misc{reference.wolfram_2020_dialoginput, author="Wolfram Research", title="{DialogInput}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/DialogInput.html}", note=[Accessed: 26-February-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_dialoginput, organization={Wolfram Research}, title={DialogInput}, year={2007}, url={https://reference.wolfram.com/language/ref/DialogInput.html}, note=[Accessed: 26-February-2021 ]}

CMS

Wolfram Language. 2007. "DialogInput." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DialogInput.html.

APA

Wolfram Language. (2007). DialogInput. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DialogInput.html