when a static event is triggered then can an instance method can handle it and register at runtime so that it gets executed when that particular event triggers.
Kesava Immidi replied
Static events can be triggered by any method of the class but static methods may only trigger static events.
The SET HANDLER statement links a list of handler methods to corresponding event triggers - either instance events or static events. The syntax and effect of the SET HANDLER statement differs according to the event type.
With instance events, you must use the FOR addition to specify the triggering instance for which you want to register the trigger. You can either specify a single triggering instance using a reference variable <ref>, or specify the handler for all instances using the statement SET HANDLER FOR ALL INSTANCES.
FOR ALL INSTANCES also applies to triggering instances that do not yet exist when the registration is made.
You cannot use the FOR addition with static events. Instead, the registrtation applies automatically to the entire class or all classes that implement an interface with a static event. The SET HANDLER statement also has an addition ACTIVATION, which allows you to register and deregister handlers automatically.