Parameter system

From SweepMe! Wiki
Jump to: navigation, search

Starting from SweepMe! version 1.5.5., a parameter system is introduced that allows you to use placeholder strings at many places in the program to make thing more variables.

A list of all defined parameters can be found using the widget Parameters.

Every parameter is a string. To enter such a parameter in a text edit field, curly brackets {...} are used. Whenever SweepMe! detects curly brackets, the content of the brackets will be replaced. There are two scenarios:

  1. The content is exactly a known parameter. For example, using {Y} in a text edit will lead to insertion of the current year.
  2. If the content is not a known parameter, SweepMe! will try to do an inline python evaluation, e.g. {2+2} will lead to insertion of 4.

You can combine the replacement of parameters and the inline python evaluation by using multiple curly brackets, e.g. {int({Y}) + int({m})} which will result in adding the integer of the current year with the integer of the current month.

Creation of individual parameters

Individual parameters can be defined using the add-on module 'Form' that is used to create formular like widgets.