Object PmiPrototype (Prototype)

The graphic item represents a graphic prototype (template of graphic instances), where multiple graphic items can be inserted. It is similar to the PmiPanel object, but the difference is that it exists only in the development environment. It is used as a temlate for creating copies of the content of the prototype (during panel compilation), by the PmiInstance item, that represents the instance of such prototype content.

The simplified idea of PmiPrototype and PmiInstance object functionality is that when the panel is being compiled, the content of the prototype is copied into all corresponding instances, that use this prototype.

The main advantage of the prototype-instance concept is that any modification done to the prototype will be applied to all instances. The content of the original prototype exists only in the development environment, doesn't exist in the running application. Only the prototype copies exist in all corresponding instances.

The PmiPrototype graphic item cannot be selected in the panel editor (as other items can). This item is selected (or created) always in the PmiInstance item by filling in the "Prototype name" configurator.

Parameterized prototypes: It is often necessary to ensure that instances created from the same prototype are slightly different. There can be for example different texts, bindings to values ... For this purpose the Parameters of graphic item can be used, by defining a set of parameters and then the specific instance sets the real value of these parameters, valid for the corresponding instance. For defining the parameters of the PmiPrototype and PmInstance objects the Item parameters configurator is used. For reference to the graphic item parameters the Macro expression $.par can be used in the configurators and for the scripts there is the PmiItem.GetPar method. The important fact for obtaining the the value of the parameter is that when detecting the value of a specific parameter, the parameter is searched from the current object through the parents by a cascade way (bubbling).

This object adopts properties and methods of object PmiPanel.
Configuration windows:
Object General information about the object
Content Content of the graphic item in the XML form
Position Setting the position, width and height of the item
Subitems It is used for creating compound items
Variables List and configuration of user defined item variables
Events Algorithms definition for the object events
Methods Definition of designer's methods in the graphic item
Panel Setting the background area of the edited graphic item
PROMOTIC 8.3.30 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