Progress Programming Tips

By Rod Gaither (rdg@worldinfo.com)


PPT-17  Setting the wait state

Tip:

When a Windows application is going to perform some task that
should not be interrupted, and may take some time it is common to
display the "Wait" cursor.  This cursor gives a visual clue that no
input will be accepted and that the system is busy.  To accomplish
this in Progress you can use the SESSION method SET-WAIT-STATE.  This
method takes a string parameter with three options - GENERAL,
COMPILER, or "".  The first two turn on the wait state while the third
turns it off.

WARNING - Be sure if you turn on the wait state that the code
to turn off the wait state is reachable!  If not you will never
get the ability to accept input to your Progress session.  As
an example, don't have some input blocking statement between
the two, as no input is possible you will never get past the
blocking statement.

EXAMPLE -

  ASSIGN logical-var = SESSION:SET-WAIT-STATE("GENERAL").
  ASSIGN logical-var = SESSION:SET-WAIT-STATE("").

Wisdom:

No development effort is ever finished.

Rod Gaither                  | rdg@worldinfo.com
World Information Systems    | (910) 333-2580  Voice
Greensboro, NC               | (910) 333-2584  Fax