Working with Parameters

The number of parameters a rendering can contain is defined by the object’s type definition. For example, if the type definition is Type:: Real → Real → Real, then a rendering for that object can have at most two parameters. You can create renderings that have fewer parameters than the maximum set by the type definition.

To delete a parameter, highlight the parameter in the design area and press the delete button. Only the last parameter in the rendering can be deleted.

If the rendering has fewer than the maximum number of parameters, you can add a parameter by clicking the Add parameter button or right-click the name of the object in the rendering tree and select Add parameter from the context menu.

If the rendering has the maximum number of parameters, the Add parameter button and context menu item are disabled.

If the object is a list object (an object with a type definition of the form [TypeA] -> TypeB), then the handling of the number of parameters in the rendering Editor is different. See Creating Renderings for List Objects for more information.

Right click on a parameter within the rendering tree or in the design box to access the following options:

  • Add copy: Adds a copy of the selected parameter to the bottom of the tree and appends it to the far right side of the rendering. Note that this doesn't add another parameter, it just allows you to put another copy of this same parameter into the rendering. This is not commonly needed but is useful, for example, in expressions like:

    where we always want the parameter that represents the order to be the same in the numerator and denominator.

  • Add symbol: Adds a new symbol to the bottom of the tree and appends it to the far right side of the rendering. The Edit Symbol dialog box is used to construct the symbol. For more information, see Working with Symbols.
  • Add line: Adds a new line element to the bottom of the rendering tree and turns the cursor into a ‘+’ for a drawing a line in your rendering. For more information, see Working with Lines.
  • Delete: Deletes the selected parameter.