Has anyone else had issues with progress bars not updating in CS6? My progress bars stopped working in about half of my scripts for CS6. They all work fine in CS3/4/5. I'm using the same exact code in all of my scripts so it doesn't make much sense why some work and some don't.
Nothing alarms. The progress bar window will display but the progress bar will not update. I can change the initial value to something other than zero and it will display that value on the progress bar the entire time. But it will not update after that. I can't see anything different in my scripts that progress bar works and the scripts where it doesn't.
I stumbled on a strange fix for one of my scripts which doesn't make any sense at all. For that progress bar, it launches after the users presses the run button. The run button closes a dialog window and launches the progress bar. Depending on the user options, sometimes a button to select a folder would be enabled and sometimes it would be disabled. The progress bar would only work if the button was disable. Once I forced this button to be disabled prior to the dialog window closing, the progress bar started working every time. I can't even see how these were linked. I toggled the issue several times to prove it was repeatable and somehow linked to that button being disabled.
For my other scripts however, there isn't even a dialog open when the progress bar is being used. It is tracking the progress at start up prior to any dialog window being created. About half of them don't work and its really puzzling.
This is the code for the progress bar window
Code: Select all progress_window = new Window('palette');
progress_window.text = 'Progress';
progress_window.orientation = 'column';
progress_window.alignChildren = 'fill';
progress_window.margins = 30;
progress_window_text = progress_window.add('statictext',undefined,'Doing Stuff..............');
progress_bar = progress_window.add('progressbar');
progress_bar.minvalue = 0;
progress_bar.maxvalue = 100;
progress_bar.value = 0;
progress_bar.preferredSize = [300, 20];
progress_window.center();
progress_window.show();
To update the progress, I'm just updating the progress bar with fixed values periodically throughout the script.
For example:
Code: Select allprogress_bar.value = 25;
CS6 Progress bar issues
CS6 Progress bar issues
Hi,
have you find out a solution/workaround for that? I'm stuck with a progress bar very similar issue.
I've to display a complex ScriptUI (actually a Flash GUI within a ScriptUI) after some layers manipulation has been performed: so in the meantime I show a progress bar, updating the values according to the layers routine and eventually I close the progress bar and show the "true" GUI.
What happens to me is that the bar doesn't update at all: even worse, the whole layers routine hangs and never completes (so that the true GUI never shows either).
Thanks in advance for any suggestion!
Davide
========
UPDATE 1
As a side note: I've run the SnpCreateProgressBar.jsx example in the ESTK.
1. With ESTK as a host, it's ok
2. With PS as a host, I've got to set the Window as 'dialog' and not 'palette' otherwise the window flashes one time (appears and disappears) in PS and it's gone. Is this a known behavior?
3. With PS CS6 as a host ('dialog'), the look of the Window is quite different (bearable) but the update progress isn't smooth at all: actually it's just one frame 0%, one frame 100% and stop
4. With PS CS5.1 as a host, it's the same.
========
UPDATE 2
I've verified that the progress bar updates - unless is shown (very much useful indeed...). That is:
- you create the bar, you update it, you show is - the bar is at the value it's supposed to be
- you create the bar, you show it, you update is: it hangs at the initial state (and the whole script stops)
have you find out a solution/workaround for that? I'm stuck with a progress bar very similar issue.
I've to display a complex ScriptUI (actually a Flash GUI within a ScriptUI) after some layers manipulation has been performed: so in the meantime I show a progress bar, updating the values according to the layers routine and eventually I close the progress bar and show the "true" GUI.
What happens to me is that the bar doesn't update at all: even worse, the whole layers routine hangs and never completes (so that the true GUI never shows either).
Thanks in advance for any suggestion!
Davide
========
UPDATE 1
As a side note: I've run the SnpCreateProgressBar.jsx example in the ESTK.
1. With ESTK as a host, it's ok
2. With PS as a host, I've got to set the Window as 'dialog' and not 'palette' otherwise the window flashes one time (appears and disappears) in PS and it's gone. Is this a known behavior?
3. With PS CS6 as a host ('dialog'), the look of the Window is quite different (bearable) but the update progress isn't smooth at all: actually it's just one frame 0%, one frame 100% and stop
4. With PS CS5.1 as a host, it's the same.
========
UPDATE 2
I've verified that the progress bar updates - unless is shown (very much useful indeed...). That is:
- you create the bar, you update it, you show is - the bar is at the value it's supposed to be
- you create the bar, you show it, you update is: it hangs at the initial state (and the whole script stops)
CS6 Progress bar issues
If you call app.refresh() after each update to your progress bars do they update properly?
CS6 Progress bar issues
Actually I've been having related problems with windows as well, but it seems I've now understood how to solve them (read the post there).
Thanks,
Davide
Thanks,
Davide