retrieve an element option value from a running Maplet application
Get(handle, objs, opts)
object(s) being retrieved
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
identifier for the Maplet application
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.
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 1 is 1. 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.
update = true or 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.
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()
int(Maplets:-Tools:-Get('TF1'::algebraic, corrections), x);
maplet1 ≔ Maplet⁡TextField'TF1'⁡,Button⁡Integrate w.r.t. x,Evaluate⁡'TF1'=MyProc,Button⁡OK,Shutdown⁡'TF1':
Compare the error messages displayed by the following Maplet application by using '[x]' and 'x y'.
maplet2 ≔ Maplet⁡TextField'TF1'⁡,Button⁡Integrate w.r.t. x,Evaluate⁡'TF1'='∫TF1ⅆx',Button⁡OK,Shutdown⁡'TF1':
Note that the error messages are similar to:
Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to indefinite integration.
int(x y, x);
syntax error, missing operator or `;`:
Overview of Maplet Applications
Download Help Document
What kind of issue would you like to report? (Optional)