Page 1 of 1

How do I break the cycle by pressing Cancel?

Posted: Mon Mar 21, 2022 10:23 pm
by Eugene Lutsenko
How do I break the cycle by pressing Cancel?

Code: Select all

   DO WHILE .NOT. EOF()

      lStatus=DC_CompleteEvents();IF lCancelled;EXIT;ENDIF           // Выход из цикла загрузки по нажатию клавиши Cancel
It doesn't work for me.

I tried a few more different options, for example with lStatus, but nothing worked

Re: How do I break the cycle by pressing Cancel?

Posted: Mon Mar 21, 2022 11:42 pm
by Tom
You must use separate threads, one for the dialog showing the "cancel"-button, one for the DO-WHILE-NOT-EOF()-loop (which maybe startet from the dialog). If the button is pressed, you maybe set a var or a get-set-function, which's result is used in the loop.