progress bar




Dear All,

I have a progress bar setup with a timeout function. A callback function
(another widget) has a for loop and in it, it updates a global variable. I then
try to use this global variable to update my progress bar via the timeout
function. It doesnt work, the for loops get finished and then the timeout gets
excuted afterwards. Is there a way to get around it, ie monitor some for loop
execution


code something like this.

global x;

timeoutFunction(gpointer) { // execute every 1sec
 
 setProgress(progress, x)
}

buttonClickedCB(gtkwidget, gpointer) {

  for (i:1->1000000000) // takes 30sec
     x = i;
}


Thanks in advance
Johnson



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