Get - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Maplets[Tools]

  

Get

  

retrieve an element option value from a running Maplet application

 

Calling Sequence

Parameters

Description

Examples

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 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.

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:

withMapletsElements:

maplet1MapletTextFieldTF1,ButtonIntegrate w.r.t. x,EvaluateTF1=MyProc,ButtonOK,ShutdownTF1:

MapletsDisplaymaplet1

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

maplet2MapletTextFieldTF1,ButtonIntegrate w.r.t. x,EvaluateTF1=intTF1,x,ButtonOK,ShutdownTF1:

MapletsDisplaymaplet2

Note that the error messages are similar to:

intx,x

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 `;`:

See Also

int

Maplets/ElementOptions

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Button]

Maplets[Elements][Evaluate]

Maplets[Elements][Shutdown]

Maplets[Elements][TextField]

Maplets[Examples][GetInput]

Maplets[Tools]

Maplets[Tools][Set]

Overview of Maplet Applications

proc

type