Table of Contents

TatEventDispatcher Class

Handles the routing of a specific Delphi event to a script routine.

Remarks

When the event broker assigns a script routine to a Delphi event, it creates a TatEventDispatcher to intercept that event and forward execution to the specified routine. Dispatchers are created and destroyed automatically by the scripter when events are set or unset.

Syntax

Unit: atScript

TatEventDispatcher = class(TCollectionItem);

Methods

Name Description
EventBroker Provides a reference to the event broker which owns this dispatcher.
Unset Unset the event of this dispatcher.

Properties

Name Description
Adapter Contains a reference to the event adapter used to handle this event.
AfterCall Contains a pointer to the Delphi method to be called when the Delphi event fires, after the script routine is executed.
BeforeCall Contains a pointer to the Delphi method to be called when the Delphi event fires, before the script routine is executed.
CustomCall Not used.
Instance Contains the instance of the object for which the event will be handled.
OldCall Contains a pointer to the Delphi method that was the previous event handler before the script routine was set.
PropInfo Contains the RTTI information about the event property being handled by this dispatcher.
RoutineName Contains the name of the script routine that will be executed when the Delphi event fires.
Script Provides a reference to the script object containing the routine to be executed when the Delphi event fires.
Scripter Provides a reference to the scripter component which contains the script routine which to be executed when the Delphi event fires.