PDA

View Full Version : Auto Updating timer?



ealbers
22 May 2008, 11:34 AM
I've been playing with the desktop example, I'd like to update one of the windows say every 5 seconds....

Is there a Timer in Ext available? Where I could have a object refresh every so often?

Thanks!

benny00
22 May 2008, 12:14 PM
I think you are looking for Ext.TaskMgr. (check the Docs)
Its pretty simple:

// Start a simple clock task that updates a div once per second
var task = {
run: function(){
Ext.fly('clock').update(new Date().format('g:i:s A'));
},
interval: 1000 //1 second
}
Ext.TaskMgr.start(task);