 Return Item - Maple Help

Maplets[Elements]

 ReturnItem
 specify value to be returned from a Maplet application Calling Sequence ReturnItem(opts) Parameters

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

 • The ReturnItem element specifies which values are returned to Maple when a Maplet application closes.
 • The ReturnItem element features can be modified by using options. 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 item option

 • A ReturnItem element cannot contain other elements.
 • A ReturnItem element can be contained in a Return element.
 • The following table describes the control and use of the ReturnItem 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 item x x option x

 • The opts argument can contain one or more of the following equations that set Maplet application options.
 item = reference to an element (name or string)
 A reference to the element to return.
 option = symbol
 Defines which option of the given element is to be returned.  By default, it is the option value. Examples

 > $\mathrm{with}\left(\mathrm{Maplets}\left[\mathrm{Elements}\right]\right):$
 > $\mathrm{maplet}≔\mathrm{Maplet}\left(\left[\left[\mathrm{BoxCell}\left("Enter some text:"\right)\right],\left[\mathrm{TextField}\left['\mathrm{TF1}'\right]\left(\right)\right],\left[\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\mathrm{return}='\mathrm{R1}'\right)\right)\right]\right],\mathrm{Return}\left['\mathrm{R1}'\right]\left(\mathrm{ReturnItem}\left('\mathrm{item}'='\mathrm{TF1}'\right)\right)\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{maplet}\right)$

This Maplet application can be rewritten by using the following shortcut.

 > $\mathrm{maplet}≔\mathrm{Maplet}\left(\left[\left[\mathrm{BoxCell}\left("Enter some text:"\right)\right],\left[\mathrm{TextField}\left['\mathrm{TF1}'\right]\left(\right)\right],\left[\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\left['\mathrm{TF1}'\right]\right)\right)\right]\right]\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{maplet}\right)$