Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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 or Pmg object parameter.

Obsolete syntax of 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 the Pma object configurators, 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 provide 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 - Data binding to Pma object property" data binding and in the "GP - Data binding to the property of the Pmg object" 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 autoamtically (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 sParams parameter of OpenView method or
- by macro expression in the panel in the "sParams default value" configurator.

 
Example:
If nmb is parameter of the PmgRoot object and if the panel was opened for example by method OpenView("/panel", "", "par:nmb=2") and if the boil text identifier marks the "Boiler" national text, then the complete macro gives the result: "Boiler2".
$.join($.text("app","boil"),$.par("nmb"))

Configuration items in extended value editor:
ParameterSpecifies parameter name
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice