2

I want to collect a bunch of events in a defined timeframe. I thought about using Ext.util.DelayedTask like

var task = new Ext.util.DelayedTask(function(a,b) { console.log(a,b) }, this),
    handler = function(a,b) { task.delay(500); };

ref.on({
    eventA: handler,
    eventB: handler,
    scope: this
});

But that seems not to work because the arguments are undefined.

4

1 回答 1

2

You need to apply the arguments here. Try this

handler = function(a,b) { task.delay(500, null, null, arguments); };
于 2013-07-10T09:16:29.630 回答