ENDKEY

Posted by st0nes on 19-Feb-2010 02:12

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.

All Replies

Posted by Admin on 26-Mar-2010 06:25

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.

Posted by SJProgress on 26-Mar-2010 06:30

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

Posted by noblesw on 06-Apr-2010 13:15

I agree.  Try adding "ON ERROR NEXT MAIN-LOOP" to your inner-most loop.

Posted by Tim Kuehn on 06-Apr-2010 13:25

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.

Posted by st0nes on 07-Apr-2010 02:06

Thank you Pavan.  The problem was that one of the "blahs" contained a call to an external procedure which did not return the lastkey.

This thread is closed