Maplets[Examples] - Maple Programming Help

Home : Support : Online Help : Programming : Maplets : Examples : Maplets/Examples/GetInput

Maplets[Examples]

 GetInput
 display a Maplet application that requests input

 Calling Sequence GetInput(msg, opts)

Parameters

 msg - string or symbol opts - equation(s) of the form option=value where option is one of title, type, or value; specify options for the Maplet application

Description

 • The GetInput(msg) calling sequence displays a Maplet application that prompts the user for input. The user can enter text in the input field and click OK, which returns the text, or the user can select Cancel, which raises an exception.
 • The GetInput sample Maplet worksheet describes how to write a Maplet application that behaves similarly to this routine by using the Maplets[Elements] package.
 • The opts argument can contain one or more of the following equations that set Maplet application options.
 title = string or symbol
 Specifies the Maplet application title.  By default, the title is Requesting Input.
 type = error, information, plain, or warning
 The input request type.  By default, the type is plain. This option determines the icon that is located left of the text.
 value = string or anything
 The text that initially appears in the input field.  If this option is not of type string, it is converted to one by using $\mathrm{sprintf}\left("%a",...\right)$.  The default value is $""$.

Examples

 > $\mathrm{with}\left(\mathrm{Maplets}[\mathrm{Examples}]\right):$
 > $\mathrm{GetInput}\left("This expression does not parse, please correct:",'\mathrm{value}'="2 x + 3",'\mathrm{type}'=\mathrm{error}\right)$