[Gambas-user] How to abort a large loop ?

Olivier Cruilles linuxos at ...1896...
Tue Apr 29 16:12:29 CEST 2008


Hello,

I think it's because your WAIT is too short.


Try with :   wait 0,1     or wait 0,5

Olivier Cruilles
Mail: linuxos at ...1896...


Le 29 avr. 08 à 15:10, Pino Zollo a écrit :

> 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
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>






More information about the User mailing list