Hi all,
I am new to Progress and having trouble getting it to do as instructed. I have code that looks something like this:-
MAIN-LOOP:
do while true on endkey undo, leave with frame f-frame-1:
do transaction:
blah.
blah.
NESTED-LOOP-1:
do while true on endkey undo, leave MAIN-LOOP:
blah.
blah.
NESTED-LOOP-2:
do while true on endkey undo, next MAIN-LOOP:
blah.
blah.
leave NESTED-LOOP-2.
end.
blah.
leave NESTED-LOOP-1.
end.
end.
end.
The problem is that when endkey is pressed between the 'blahs' in nested-loop-2, execution doesn't go to main-loop, it just seems to on with nested-loop-2. Any ideas would be welcome.
Thanks in anticipation.
Hi,
if i am not wrong, the result you are getting now depends on you blah blah also.
Because the Key which you are saying as End Key may also behave as error key depends on some criteria.
So please give some more description for this & try out if you got some idea from what i said.
Vielen Dank für Ihre Nachricht! Ich werde ab 06.April wieder im Büro sein und Ihre Email-Nachricht beantworten.
Mit freundlichen Grüssen - Josef Siegetsleitner, Easyrent Software Entwicklung
Thank you for your message!. I will return to my office on April, 6th and will answer your email that day.
Best regards - Josef Siegetsleitner - Easyrent Software Development
I agree. Try adding "ON ERROR NEXT MAIN-LOOP" to your inner-most loop.
I'd seriously recommend looking into event driven development - it makes these kinds of nested loops vanish like magic.
I'd also avoid having a UI inside of a transaction if at all possible.
Thank you Pavan. The problem was that one of the "blahs" contained a call to an external procedure which did not return the lastkey.