SET-CALLBACK( ) method

Associates a method within a class instance, or an internal procedure within a persistent procedure, with an ABL callback event.

Return type: LOGICAL

Applies to: Buffer object handle, Procedure object handle, ProDataSet object handle, Query object handle

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.
  • For a ProDataSet buffer object handle, this can be "BEFORE-FILL", "AFTER-FILL", "BEFORE-ROW-FILL", "AFTER-ROW-FILL", "ROW-CREATE", "ROW-DELETE", "ROW-UPDATE", "FIND-FAILED", or "SYNCHRONIZE".
  • For a Procedure object handle, when calling a Web service, this can be either "REQUEST-HEADER" or "RESPONSE-HEADER".
  • For a ProDataSet object handle, this can be "BEFORE-FILL" or "AFTER-FILL".
  • For a Query object handle, this can be "OFF-END".

You can also use the APPLY-CALLBACK( ) method to apply a callback procedure for an object.

routine-name
A quoted string or character expression representing the name of a method or an internal procedure that resides within routine-context. If calling this on a procedure handle, routine-name can only be an internal procedure.
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

See also

APPLY-CALLBACK( ) method, GET-CALLBACK-PROC-CONTEXT( ) method, GET-CALLBACK-PROC-NAME( ) method, OFF-END event, ProDataSet events