 Set - Maple Help

Maplets[Tools]

 Set
 set an element option value in a running Maplet application Calling Sequence Set(objs) Set(handle, objs) Parameters

 objs - object(s) being set handle - identifier for the Maplet application Description

 • The Set(objs) and Set(handle, objs) calling sequences set the value of a specified element option in a running Maplet application. Refer to individual Element help pages or see Maplets/ElementOptions to determine the element options with which Set can be used.
 • The use of Set is limited to within procedures, including library procedures. Set cannot be used in a Maplet application definition.
 • The distinction between Set and SetOption is that Set is used within a procedure and SetOption is used within a Maplet application definition. Element options that can be set by using Set can also be set by using SetOption.
 • If a handle is not provided, Set must be used within a procedure called by the execution of an Evaluate command element. The variable thismaplet can be used to specify the calling Maplet application.
 • Each object in objs must be in one of the following forms where ref is a reference to an element in the Maplet application, opt is a symbol indicating an option for the referenced element, and the right side is any accepted value for the specified option opt for the Maplet application element referenced by ref.

 ref = anything ref(opt) = anything

 If no option opt is specified, the value option is set. Examples

Try this example by using the following as entries in the input field: 'x', '[x]', and 'x y'. With the last two inputs, the Maplet application returns errors.

 > myProc := proc()    local integrand;    Maplets:-Tools:-Set( 'TF1' = int(Maplets:-Tools:-Get('TF1'::algebraic), x) ); end proc:
 > $\mathrm{with}\left({\mathrm{Maplets}}_{\mathrm{Elements}}\right):$
 > $\mathrm{maplet1}≔\mathrm{Maplet}\left(\left[{\mathrm{TextField}}_{'\mathrm{TF1}'}\left(\right),\left[\mathrm{Button}\left("Integrate w.r.t. x",\mathrm{Evaluate}\left('\mathrm{function}'="myProc"\right)\right),\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\left['\mathrm{TF1}'\right]\right)\right)\right]\right]\right):$
 > ${\mathrm{Maplets}}_{\mathrm{Display}}\left(\mathrm{maplet1}\right)$

Compare the error messages displayed by the following Maplet application by using '[x]' and 'x y'.

 > $\mathrm{maplet2}≔\mathrm{Maplet}\left(\left[{\mathrm{TextField}}_{'\mathrm{TF1}'}\left(\right),\left[\mathrm{Button}\left("Integrate w.r.t. x",\mathrm{Evaluate}\left('\mathrm{TF1}'='∫\mathrm{TF1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx'\right)\right),\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\left['\mathrm{TF1}'\right]\right)\right)\right]\right]\right):$
 > ${\mathrm{Maplets}}_{\mathrm{Display}}\left(\mathrm{maplet2}\right)$

Note that the error messages are similar to:

 > $∫\left[x\right]\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$