X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/Observable.html diff --git a/docs/source/Observable.html b/docs/source/Observable.html index 8f351aef..2640fd6a 100644 --- a/docs/source/Observable.html +++ b/docs/source/Observable.html @@ -14,7 +14,7 @@ var EXTUTIL = Ext.util, ISOBJECT = Ext.isObject, TRUE = true, FALSE = false; -
/** +/** * @class Ext.util.Observable * Base class that provides a common interface for publishing events. Subclasses are expected to * to have a property "events" with all the events defined, and, optionally, a property "listeners" @@ -373,27 +373,27 @@ function createTargeted(h, o, scope){ }; }; -function createBuffered(h, o, fn, scope){ - fn.task = new EXTUTIL.DelayedTask(); +function createBuffered(h, o, l, scope){ + l.task = new EXTUTIL.DelayedTask(); return function(){ - fn.task.delay(o.buffer, h, scope, TOARRAY(arguments)); + l.task.delay(o.buffer, h, scope, TOARRAY(arguments)); }; -} +}; function createSingle(h, e, fn, scope){ return function(){ e.removeListener(fn, scope); return h.apply(scope, arguments); }; -} +}; -function createDelayed(h, o, fn, scope){ +function createDelayed(h, o, l, scope){ return function(){ var task = new EXTUTIL.DelayedTask(); - if(!fn.tasks) { - fn.tasks = []; + if(!l.tasks) { + l.tasks = []; } - fn.tasks.push(task); + l.tasks.push(task); task.delay(o.delay || 10, h, scope, TOARRAY(arguments)); }; }; @@ -429,13 +429,13 @@ EXTUTIL.Event.prototype = { h = createTargeted(h, o, scope); } if(o.delay){ - h = createDelayed(h, o, fn, scope); + h = createDelayed(h, o, l, scope); } if(o.single){ h = createSingle(h, this, fn, scope); } if(o.buffer){ - h = createBuffered(h, o, fn, scope); + h = createBuffered(h, o, l, scope); } l.fireFn = h; return l; @@ -472,13 +472,11 @@ EXTUTIL.Event.prototype = { if (me.firing) { me.listeners = me.listeners.slice(0); } - l = me.listeners[index].fn; - // Cancel buffered tasks + l = me.listeners[index]; if(l.task) { l.task.cancel(); delete l.task; } - // Cancel delayed tasks k = l.tasks && l.tasks.length; if(k) { while(k--) {