Re: stop process with button




calmar wrote:

Hi,
.......  thread, so it can be cancelled ...........

the very first thing I tried before writing this question, to wrote a stop function with a button which sets a varialbe to TRUE. (true for ..yeah..aborting please)

This variable in the main working function loop (which is by defauft at the beginning FALSE) ckeckes frequently this variable and loops only when it's set to FALSE. Therefore when I push the 'abort' button, the value from the variable becomes TRUE in the stopfuction ( a global variable)..when this stop function has finished (it got executed because I have this in my main working function: (while(g_main_iteration(FALSE));) the main working function gets continued again, but this time the variable is TRUE, so it finished and return.

Well, I guess it's not good described above. Anyway this seems to work fine at my second attempt now :-) (the first time, I must have made serious faults, and I thought I need to do some complicate 'thread-stopping' stuff and similar, but it seems it's not necessary :-))

Anyway  my question is answered now.
calmar





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]