[Gambas-user] How to abort a large loop ?
Pino Zollo
pinozollo at ...626...
Tue Apr 29 15:10:07 CEST 2008
Hi,
In my form I have the button 'GO' which starts a long work made in a loop
FOR-NEXT.
There is also a button 'ABORT' just in case the user wants to stop the long
work.
The code is more or less like this:
abort_flag = FALSE
PUBLIC SUB Go_Click()
FOR .......
.....big computation
WAIT
IF abort_flag THEN BREAK
NEXT
END
PUBLIC SUB Abort_Click()
abort_flag=TRUE
END
But unfortunately it does not work as the button 'ABORT' is frozen until the
loop FOR-NEXT ends. The WAIT does not help.
Please Help !
Pino
More information about the User
mailing list