Question

I want to implement stopwatch functionality in extjs4 with start timer and pause timer events. I searched lot but not getting how to implement it in Extjs4 MVC format. What do I need to include as xtype in view? How do I need to process it?

Était-ce utile?

La solution

You can use Ext.TaskManager to start and stop arbitrary tasks. See Reference

// 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.TaskManager.start(task);

You can add your conditions to start and stop

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top