Methods - property of object PmObject

Returns the object, by which the designer's methods defined on the Methods page are accessed.
Methods As Object
oObject.Methods.method1 par1, par2 ...
Property access for read only. The property itself cannot be changed (is "read only"), but the called method can change anything by its algorithm.
Designer's methods in PmPanel object:

This property is also functional for Web panels. See Example2.

Calling the methods for Web is protected by the WebMethods permission.

Limitations: Called methods can have parameters and an output value (pResult) only:
- simple data types (e.g. Integer, String, etc.)
- 1-dimensional array defined e.g. Dim arr(20)
- 2-dimensional array defined e.g. Dim arr(10,20)
- there must not be other arrays in the array items

Calling this method for Web panels should be used with limit because each such calling performs a XML communication with the server! If, for example, 100 items were in the picture and this method in the onRefresh event was called in each such item, then 100 communications would been performed step by step during each refresh of the picture, which wouldn't been probably acceptable.

Designer's methods in PmSequencer object:

The PmSequencer object is special because its main onStep event can be fired in both main or working thread ("thread:work;" or "thread:main;"). Therefore the methods were doubled internally and then compiled in both main and working thread. If the method is called from the working thread, then it is executed in this thread. In other cases it is executed in the main theread (as other object methods are).

This allows easy creation of auxiliary functions making the onStep event itself much better arranged. Even if the onStep is called alternatively in main and working thread the method is then called in the corresponding thread.

Designer's methods in PmRoot object:

Methods in PmRoot object (application global methods) are called by the Pm.Methods property.

An example of the access to the methods with the user's names Init and Close (x and y are parameters of the Init method)
VBScriptSelect and copy to clipboard

oObject.Methods.Init x, y
pResult = oObject.Methods.Close()
The methods of the PmPanel object can be called also from the events of graphic items. They can be called even if the panel is created for Web - in this case the panel-client calls this method remotely by means of the XML communication! This way, for example, the method would be called from the onButtonUp event of the PmiButton graphic item:
JavaScriptVBScriptSelect and copy to clipboard

var nVal = pMe.PmPanel.Methods.GetMyValue(x, y);
Next examples:
See: Example in the description of Methods configuration page.
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