Infinite loop within a callback



Hi,
I need to start an infinite loop when a toggle button receive the "toggled" event and I must to stop this loop when the is re-toggled.
If I write:
 
while(TRUE) {
   ...
}
 
I can't listen event and I can't stop the loop.
In addition to using threads, what a solution can I use?
Thanx,
Angelo Carpenzano
 
 
Sorry for my bad english ;-)
 


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