PDA

View Full Version : [OPEN] Ext.Function.createBuffered BUG



xuebi1109
4 Aug 2011, 11:25 PM
createBuffered:function(fn, buffer, scope, args){// by ext-4.0.2a
return function(){
var timerId;
return function(){
var me =this;
if(timerId){
clearInterval(timerId);//i think this should is clearTimeout
timerId =null;
}
timerId = setTimeout(function(){
fn.apply(scope || me, args || arguments);
}, buffer);
};
}();
},

Animal
5 Aug 2011, 7:54 AM
Good spot! It appears to work, but you're right, clearTimeout is the match for setTimeout! I'll fix for 4.0.6