CreatePmAction - method of object Pm

Creates object of the PmAction type.
CreatePmAction(nType As Long, Par1 As Object, Par2 As String) As Object
oAction = Pm.CreatePmAction(nType, Par1, Par2)
nType(Long) Created action type. There is just a single type so far.
1 - An action is created representing the calling of user method of the PROMOTIC object or graphic item (i.e. methods defined on the Methods page).

Therefore it is necessary to create the user method with defined name (this name is set into the Par2 parameter) in some object (such object is then set into the Par1 parameter) The method has two parameters:

oSystem - Object of the PmMap type. The properties of this object are set by system based on the source of calling. See Usage of the object PmAction.
oPrivate - Object of the PmMap type. The properties of this object are set by the designer in the PmAction.PrivateData object.
Par1(Object) Object (i.e. PROMOTIC object or graphic item) containing the user method.
Par2(String) User method name.
The method can also be called in the graphic item events for Web Panels.
The PmAction object is handy if it is needed that "someone" creates such object (i.e. creates "action"), then passes this object forward and then "someone else sometime" executes such action. DThe important point is that "someone else" just calls the Call method and does not need to know what is actually inside (e.g. does not know that user method is called over some object using some parameters).
See Example of creation and usage of PmAction object.
- Pm
- Abs
- Cos
- CreatePmAction
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice