|
Calling Sequence
|
|
Get(objs, opts)
Get(handle, objs, opts)
|
|
Parameters
|
|
objs
|
-
|
object(s) being retrieved
|
opts
|
-
|
equation(s) of the form option=value where option is one of corrections or update; specify options for retrieving an element option value from a Maplet application
|
handle
|
-
|
identifier for the Maplet application
|
|
|
|
|
Description
|
|
•
|
The Get(obj, opts) and Get(handle, obj, opts) calling sequences retrieve the value of a specified element option from a running Maplet application. Refer to individual Element help pages or see Maplets/ElementOptions to determine the element options with which Get can be used.
|
•
|
The use of Get is limited to within procedures, including library procedures. Get cannot be used in a Maplet application definition.
|
•
|
If handle is not provided, Get 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, typ is the required type of the specified value, and reference specifies that the value being retrieved is a reference to another element in the Maplet application.
|
ref
|
ref(opt)
|
ref::typ
|
ref(opt)::typ
|
ref(opt)::reference
|
|
|
|
If no option opt is specified, the value option is retrieved.
|
|
If a type typ is specified, the object is parsed. That is, the double quotations are removed from the string. For example, the parsed value of is . If the object does not parse, an error is raised. If the object parses, but is not of type typ, an error is raised. Otherwise, the parsed value of the option opt is returned.
|
•
|
The opts argument can contain one or more of the following equations that define Get options.
|
|
corrections = true or false
|
|
If this option is set to true and any item that is associated with a type fails to parse or fails to be of the appropriate type, an input dialog is displayed that prompts the user to correct it. By default, the value is false.
|
|
If this option is set to true, any changes to the option value in the procedure are copied to the element option in the Maplet application. By default, the value is false.
|
|
|
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;
int(Maplets:-Tools:-Get('TF1'::algebraic, corrections), x);
end proc:
|
>
|
|
>
|
|
Compare the error messages displayed by the following Maplet application by using '[x]' and 'x y'.
>
|
|
Note that the error messages are similar to:
syntax error, missing operator or `;`:
| |
|
|
|