Parameter system

From SweepMe! Wiki
Revision as of 22:38, 10 October 2020 by Afischer (talk | contribs) (Created page with "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....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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 know 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.