Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Preconfiguration "Basic mathematic calculator"

The window contains the calculator with basic mathematic operations. It is handy when using touch screens.
 
This preconfiguration can be activated when creating a new object (e.g. by "New object" in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: " / Panels (PmPanel) / Keyboards".

This preconfiguration can be used with the objects: PmFolder, PmRoot, PmPanel or PmWorkspace.

 
- Preconfiguration creates an object of type PmPanel.
- The preconfiguration is created including the panel (PmPanel object) functionality as a Web panel.
 
The OpenView method with entry parameter oExtra can be used to open the panel. See How to work with modal windows. In the onPanelStartEnd event the entry value of the argument is loaded into the display (PmiText). In the onPanelStopEnd event after the OK button is pressed the value from PmiText is returned back to the object that called the OpenView method.

It is also possible to use the OpenView method for opening the panel. After opening the panel, the value will be in default state (0), but the computed value cannot be returned.

These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the application object tree. This is a system name and must not contain diacritics, empty string, spaces and the first character must not be a number.

Default: "Calc"

PermissionsOn this page permissions of the object are defined. See Description of the page Permissions.
Enable as Web componentIt indicates if this object has to be registered as a Web server component

After this preconfiguration is created, the configurator is se to: PmPanel > Web server > Enable as Web component.

Example1:
The example in VBScript syntax:
Opening the preconfigured window in the panel using the onButtonUp event of the PmiButton graphic item.
Dim oExtra, n
n = 328
Set oExtra = Pm.CreatePmMap()
oExtra.mapSetValueAt "onClose", Pm.CreatePmAction(1, pMe, "ClosePanel")
Obtaining returned value of the ClosePanel user method with parameters oSystem and oPrivate of this graphic item.
Dim val
val = oSystem.ReturnValue
If Pm.IsValid(val) Then
  Pm.Debug "CalcValue=" & val
End If
-------------------------
The example in JavaScript syntax:
Opening the preconfigured window in the panel using the onButtonUp event of the PmiButton graphic item.
var n = 328;
var oExtra = Pm.CreatePmMap();
oExtra.onClose = Pm.CreatePmAction(1, pMe, "ClosePanel");
pMe.PmPanel.OpenView("/Calc", "target:_blank;modal:1;", "", oExtra);
Obtaining returned value of the ClosePanel user method with parameters oSystem and oPrivate of this graphic item.
var val = oSystem.ReturnValue;
  Pm.Debug("CalcValue=" + val);
 
Example2:
Opening the preconfigured window in the panel using the onButtonUp event of the PmiButton graphic item.Open the panel with no input and output value.
-------------------------
The example in VBScript syntax:
-------------------------
The example in JavaScript syntax:
pMe.PmPanel.OpenView("/Calc", "target:_blank;size:250,350;");
 
This preconfiguration is used in PreCfg - Preconfiguration examples.
PROMOTIC 8.3.20 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