Kbase P128844: How to run a trigger block on the endkey event in a loop?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  01/03/2008 |
|
Status: Unverified
GOAL:
How to run a trigger block on the endkey event in a loop?
GOAL:
How to respond to the endkey event in a loop and run trigger block?
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
The sample code below will trap the endkey event and run the "test" procedure trigger block should it occur while processing the DO block:
def var lQuit as logical no-undo.
def var i as int no-undo.
/* 1. trap endkey event and set lQuit to true */
on F4, end-error, endkey anywhere
lQuit = true.
/* 2. procedure block that checks for lQuit value in every iteration */
do i = 1 to 1000000 on error undo, retry on endkey undo, retry:
process events.
if lQuit then do:
run test.
leave.
end.
end.
if lQuit then
message "hi there" view-as alert-box.
procedure test:
message "hi from test" view-as alert-box.
end procedure.