Command PV Get on event method

4D View

PV Get on event method

version 6.8


PV Get on event method (area; event) String

ParameterTypeDescription
areaLongint4D View area
eventLongint4D View event

Function result String 4D method name

Description

The PV Get on event method command returns the name of the method linked with the specified event callback.

The PV Event constants are used to define the events.

If no method has been linked to an event, PV Get on event method returns an empty string.

Example

It is wise to temporarily disable an on event call and execute a process before re-establishing the original call.

Here is a simple method that generates this "disengagement" in a generic manner using PV Get on event method, for example, for the pv on cell value changed event:

   C_STRING(32;$EventMethod)

      `Save the method that may be in place
     $EventMethod:=PV Get on event method (Area;pv on cell value changed) 

   PV ON EVENT (Area;pv on cell value changed ;"")  `Cancellation

      `... Put the process to execute here

   PV ON EVENT (Area;pv on cell value changed;$EventMethod)  `Restore

See Also

PV Get on command method, PV Get on error method, PV ON EVENT.

Constants

PV Event theme.