PDA

View Full Version : [CLOSED] How to retrigger ProgressBar on complete?



blueworld
Feb 19, 2013, 12:03 PM
Hello.

I am refreshing something every 60 seconds through a webrequest.
I want to show a progressbar that indicates the next refresh.
If the refresh has completed, the progressbar should reset and start again. Unfortunately it does only run one time.




var runProgressTasks = function (progress) {
progress.wait({
interval: 100,
duration: 6000,
increment: 60,
text: "Please Wait",
fn: function () {

doSomething();
runProgressTasks(App.ProgressTasks); <--- retrigger here !!!
}

});

}



I guess it does not work because the progressbar is still running at that moment, what can I do?

My second questions is, that as far as I understood my interval,duration and increment setting should seperate the progressbar into 60 pieces and fill one every second. But the progressbar runs much faster, does it need a specific width in order to use an increment of 60?

Regards

Daniil
Feb 19, 2013, 2:01 PM
Hi @blueworld,

I would use a TaskManager to run some task periodically.
http://examples2.ext.net/#/TaskManager/Basic/Overview/

Re: seconds

There are milliseconds. So, 6000 is in milliseconds. It is 6 seconds.