Skip to main content
Participating Frequently
October 28, 2014
Answered

Progress bar not updating on Windows

  • October 28, 2014
  • 1 reply
  • 790 views

Hi,


I have a script that create a mask on every frame of a video. In the UI I have a progress bar ( with the max value of the number of frame of my video ) that increment every time the work on the frame is done. I also have a counter of the completed frame.

The progress bar and counter work well my mac ( CS6 ), but on my windows ( also CS6 ) the progress bar and counter does not update. Instead, a spinning beach ball appears. The script itself works on both systems but I don't have the updated progress bar and counter on Windows.

Any ideas ?

Thanks

This topic has been closed for replies.
Correct answer Alex White

Hi.

Can you post your code?

You can also try this one:

  1.   var PBWin = new Window ("palette", "Progress", [0,0,300,70]); 
  2.   var ProgressText = PBWin.add("statictext", [12,10, 190, 30], "Progress"); 
  3.   var ProgressBar = PBWin.add("progressbar", [10,40,290,60], 0, 50); 
  4.   this.windowRef = PBWin; 
  5.   PBWin.show(); 
  6.   PBWin.center(); 
  7.    
  8.   for(i=0; i<50; i++){ 
  9.        
  10.       ProgressBar.value = i; 
  11.       ProgressText.text ="Processing things "+(ProgressBar.value+1)+" from "+ 50;  
  12.       PBWin.update();  
  13.       $.sleep (200);       
  14.       } 
  15.    
  16.   alert("Done"); 

1 reply

Alex White
Alex WhiteCorrect answer
Legend
October 30, 2014

Hi.

Can you post your code?

You can also try this one:

  1.   var PBWin = new Window ("palette", "Progress", [0,0,300,70]); 
  2.   var ProgressText = PBWin.add("statictext", [12,10, 190, 30], "Progress"); 
  3.   var ProgressBar = PBWin.add("progressbar", [10,40,290,60], 0, 50); 
  4.   this.windowRef = PBWin; 
  5.   PBWin.show(); 
  6.   PBWin.center(); 
  7.    
  8.   for(i=0; i<50; i++){ 
  9.        
  10.       ProgressBar.value = i; 
  11.       ProgressText.text ="Processing things "+(ProgressBar.value+1)+" from "+ 50;  
  12.       PBWin.update();  
  13.       $.sleep (200);       
  14.       } 
  15.    
  16.   alert("Done"); 
Participating Frequently
October 30, 2014

Oh well, 'myPanel.update()' did the trick for me ! I guess on MAC the panel automatically refresh itself, but we have to tell him to do so on PC.

Thanks !