Update cookies preferences
Promotic

Macro expression $.par

This macro expression represents:
1) Reference to Pma object parameter or
2) Reference to Pmg object parameter


Syntax:
$.par("xx")
- xx = the name of the Pma object parameter or Pmg object parameter.

Obsolete syntax of the macro expression: $par:xx

Evaluation of this macro is in the cascade way (bubbling), i.e. the parameter is primarily searched in the object, in which the macro expression is used.
If it is not found, then it is searched in parents of this object (in objects where the object is immersed), and finally it is searched in the PmaRoot or PmgRoot object.

This macro expression can be used:
- in configurators of Pma objects, e.g. in the "Panel title" configurator, etc.
Its use is in fact necessary in case of the prototype/instance concept (the PmaPrototype and PmaInstance objects, where parameters allow the difference of each instance).
- in configurators of Pmg objects, e.g. in text configurator of PmgString, PmgButton objects
- in data bindings, e.g. in the "PP - Pma object property" data binding and in the "GP - Pmg object property" data binding.


Note: The parameter can also be detected in the script by means of the PmaObject.GetPar or PmgObject.GetPar methods.

The relation between Pma objects and Pmg objects:
It is important that it is possible to deliver the Pma object parameter into the panel as a Pmg object parameter. The basic principle is that the Pma object parameter cannot get inside the panel automatically (the Pmg object cannot directly "see" the parameter defined outside the panel). It is necessary to to create the corresponding parameter in the PmgRoot object and set it to the value of the Pma object parameter when opening the panel. This can be done:
- by sViewPars parameter of the Pm.CreateView method or
- by macro expression in the panel in the "sViewPars default value" configurator.


Example:
If nmb is parameter of the PmgRoot object and if the panel was opened for example by method Pm.CreateView(pMe.PmPanel,"/panel", "pars:{nmb:2;}", "target:main;").Open() and if the boil text identifier marks the "Boiler" localized text, then the result of complete macro is the text "Boiler2".
$.join($.text("app","boil"),$.par("nmb"))

Configurators in extended value editor:
ParameterSpecifies parameter name
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.