Syntax
SET-CALLBACK ( callback-name , routine-name [ , routine-context ] )
|
-
callback-name
- A quoted string or character expression representing the name
of a callback. The callback-name is not case-sensitive.
-
routine-name
- A quoted string or character expression representing the name
of a method or an internal procedure that resides within routine-context.
-
routine-context
- An object reference for a class instance or a handle to a persistent procedure
that contains the method or internal procedure specified by routine-name.
If not specified, and the routine is executed within a procedure,
THIS-PROCEDURE is used as the routine context. If not specified,
and the routine is executed within a class instance, THIS-OBJECT
is used as the routine context.
If callback-name is
not a valid callback, or routine-context is not
a valid object reference or handle, this method returns FALSE; otherwise,
it returns TRUE. If the SET-CALLBACK( ) method is specified
but cannot be invoked, or it fails, no method or procedure is executed
as part of the callback event.
Notes
- If routine-name represents
a class method that is associated with an ABL event as a callback,
and the method is overridden in a derived class, the overridden
method is run when the callback is invoked.
- When used with a class instance, the SET-CALLBACK( ) method creates an internal
reference to the instance. As a result, the instance can never be garbage collected.