Maplets[Tools]
Set
set an element option value in a running Maplet application
Calling Sequence
Parameters
Description
Examples
Set(objs)
Set(handle, objs)
objs
-
object(s) being set
handle
identifier for the Maplet application
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.
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:
with⁡MapletsElements:
maplet1≔Maplet⁡TextFieldTF1⁡,Button⁡Integrate w.r.t. x,Evaluate⁡function=myProc,Button⁡OK,Shutdown⁡TF1:
MapletsDisplay⁡maplet1
Compare the error messages displayed by the following Maplet application by using '[x]' and 'x y'.
maplet2≔Maplet⁡TextFieldTF1⁡,Button⁡Integrate w.r.t. x,Evaluate⁡TF1=int⁡TF1,x,Button⁡OK,Shutdown⁡TF1:
MapletsDisplay⁡maplet2
Note that the error messages are similar to:
int⁡x,x
Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to indefinite integration.
See Also
int
Maplets/ElementOptions
Maplets[Display]
Maplets[Elements]
Maplets[Elements][Button]
Maplets[Elements][Evaluate]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][TextField]
Maplets[Tools][Get]
Overview of Maplet Applications
proc
type
Download Help Document