Shutdown - Maple Help

Maplets[Elements]

 Shutdown
 close a Maplet application

 Calling Sequence Shutdown(opts)

Parameters

 opts - equation(s) of the form option=value where option is one of return, or value; specify options for the Shutdown element

Description

 • The Shutdown command element closes a Maplet application.
 • The options for the Shutdown element determine what is returned to the Maple session after the Maplet application closes.  If a return value is not specified and a Return element is not referenced, then NULL is returned to Maple.  If only a return value is specified, then that string is returned.  If only a reference to a Return element is given, then a list containing the referenced items is returned.  If both a return value and a Return element are specified, both are returned in an expression sequence with the return value first.
 • The Shutdown element uses additional simplifications. These simplifications are described in the following table where ref is a reference and opt is a symbol (an option for the element) The table lists the simplified equation (in the left column) and its corresponding interpretation (in the right column).

 Elements, Symbols, or Types Assumed Option or Content list of ref or ref(opt) return option string or symbol value option

 • A Shutdown element cannot contain other elements.
 • A Shutdown 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 Shutdown 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 return x value x

 • The opts argument can contain one or more of the following equations that set Maplet application options.
 return = name or string
 A reference to a Return element.
 value = string or symbol
 The value that is returned when the Maplet application closes.

Examples

 > $\mathrm{with}\left(\mathrm{Maplets}\left[\mathrm{Elements}\right]\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{Maplet}\left(\left[\left[\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\right)\right)\right]\right]\right)\right)$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{Maplet}\left(\left[\left[\mathrm{Button}\left("OK",\mathrm{Shutdown}\left("0"\right)\right)\right]\right]\right)\right)$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{Maplet}\left(\left[\left["Having a good day?",\mathrm{CheckBox}\left['\mathrm{ChB1}'\right]\left(\right)\right],\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\left['\mathrm{ChB1}'\right]\right)\right)\right]\right)\right)$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{Maplet}\left(\left[\left["Having a good day?",\mathrm{CheckBox}\left['\mathrm{ChB1}'\right]\left(\right)\right],\mathrm{Button}\left("OK",\mathrm{Shutdown}\left("0",\left['\mathrm{ChB1}'\right]\right)\right)\right]\right)\right)$