Consultor Eletrônico



Kbase P110272: Error 2757 with Asynchronous Appserver event procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/10/2005
Status: Unverified

SYMPTOM(s):

Asynchronous Appserver Event procedure incorrectly sets TARGET-PROCEDURE handle.

TARGET-PROCEDURE is set to THIS-PROCEDURE value in asynchronous run event procedure.

Giving up search for external user defined function '<function>' after <number> indirections. (2757)


Given up search for external user defined function 'widgethandle' after 64 indirections. (2757)

Referencing a widget handle in an event procedure can result in error 2757.

Making an Asynchronous Appserver request and setting an event procedure in a super procedure can result in error 2757 if the event procedure references an object in the TARGET-PROCEDURE (visual object SDV etc) of the super procedure.

CAUSE:


This is expected behavior. The description of the RUN statement in the on-line help for procedure-context states:

IN procedure-context
A handle to an active procedure that contains the internal procedure specified by event-internal-procedure. If not specified, THIS-PROCEDURE is used as the procedure-context value.

This means that the RUN statement should actually specify where this event procedure resides. In effect the physical file name where the event procedure resides. This is not the target procedure handle in a super procedure stack.

But in addition to this TARGET-PROCEDURE is define as:

From within an internal procedure: A handle to the procedure file mentioned, explicitly or implicitly, by the original RUN statement that invoked (perhaps through a chain of super procedures) the current internal procedure.

However, with this event-procedure, it is not run directly from the super procedure that invoked the RUN statement, so it does not have a chain of super procedures. As such it does not reside in the same context as the super procedure and the visual object at the bottom of the super procedure stack. Subsequently its TARGET-PROCEDURE and THIS-PROCEDURE are set to the same value and not the same as those for the super procedure that invoked the Asynchronous RUN statement.

FIX:

To prevent the error 2757, any handles required in an event procedure can be passed as parameters.