AddEvent - method of the PmgObject object

Registers a function into selected event.
Empty AddEvent(String sEventName, String sFuncId, Function Func)
sEventName(String) Event name of the Pmg object.
sFuncId(String) Identifier of registered event function.
- allows removal of function by the RemoveEvent method
- prevents duplicate registering of the same function
- may contain any characters (this is not a system name)
- it is recommended to use e.g. the whole path to Pmg object
Func(Function) The event function will be called when the event is triggered.
ev: It has no properties so far.
This method is also functional in Web panels.
This method is functional only for JavaScript language.
See also:
Registration of the Test function into the onButtonUp event of the PmgButton object
JavaScriptSelect and copy to clipboard

function Test(ev)
Pm.Debug("AddEvent onButtonUp");

pMe.Items("/Butt").AddEvent("onButtonUp", pMe.GetPathName(), Test);

Pm9.00.16: Created
PROMOTIC 9.0.17 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