Kbase P13883: LOAD-MOUSE-POINTER problems - try SESSION:SET-WAIT-STATE
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/12/2002 |
|
Status: Unverified
SYMPTOM(s):
LOAD-MOUSE-POINTER problems - try SESSION:SET-WAIT-STATE
You wish to change the cursor to an hourglass while program processing is underway, for example, while a report is being generated and output to a file or printer. It is important that the user get a visual cue that further input to the application is suspended.
CAUSE:
One way programmers choose to change the cursor is LOAD-MOUSE-POINTER. The problem with this approach is that LOAD-MOUSE-POINTER changes the appearance of the pointer but does not actually disable input to the application interface.
CAUSE:
PROGRESS architecture is single-threaded, meaning that PROGRESS is unable to do other processing in parallel with report generation, etc
FIX:
The SESSION method SET-WAIT-STATE accomplishes this as part of its default behavior.
An example of SESSION:SET-WAIT-STATE( ) is the following:
DEF VAR stat AS LOGICAL.
DEF VAR i AS INT.
ON "CHOOSE" OF button-1 DO:
stat = SESSION:SET-WAIT-STATE("general").
DO i = 1 TO 200:
DISPLAY "Hello".
END.
stat = SESSION:SET-WAIT-STATE("").
END.