Consultor Eletrônico



Kbase 18246: Error 2780 - No input blocking with user defined function
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/09/1998
Error 2780 - No input blocking with user defined function

Error 2780 states the following: "Input blocking statement is invalid
while executing a user-defined function."

What is the reason for this limitation?

In order for PROGRESS to allow input blocking, control must be
given to the Windows code that handles and dispatches events (that is,
the part that actually "runs" the code.) PROGRESS is unable to call
this code proactively: rather, it is the Windows code that makes calls
to PROGRESS and essentially makes the program functionality happen.
The only way that PROGRESS can give control back to the windowing
system is for it to return to it passively.

While an expression is being evaluated by PROGRESS it is not possible
to return control to the windowing environment in this manner --
PROGRESS is required to remain in an execution context that
temporarily prevents it from doing so. Since the windowing system
must do any input blocking, this means that during the evaluation of
an expression it is not possible to get back to the windowing system
in order for input blocking to occur.

This is where user defined functions enter the picture, since they
are part of expression evaluation. For this reason the compiler
will not allow the placement of an input blocking statement directly
inside a user-defined function.

How does one prevent this error from arising at runtime? The old-
fashioned way: testing.