X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/source/Observable.html diff --git a/docs/source/Observable.html b/docs/source/Observable.html index 2640fd6a..85b1e850 100644 --- a/docs/source/Observable.html +++ b/docs/source/Observable.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
(function(){
+
+
+      
+  The source code
+    
+    
+
+
+    
/*!
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+(function(){
 
 var EXTUTIL = Ext.util,
     TOARRAY = Ext.toArray,
@@ -14,7 +20,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" @@ -34,7 +40,7 @@ Employee = Ext.extend(Ext.util.Observable, { this.listeners = config.listeners; // Call our superclass constructor to complete construction process. - Employee.superclass.constructor.call(config) + Employee.superclass.constructor.call(this, config) } });
@@ -304,7 +310,7 @@ this.addEvents('storeloaded', 'storecleared'); * @return {Boolean} True if the event is being listened for, else false */ hasListener : function(eventName){ - var e = this.events[eventName]; + var e = this.events[eventName.toLowerCase()]; return ISOBJECT(e) && e.listeners.length > 0; }, @@ -444,13 +450,13 @@ EXTUTIL.Event.prototype = { findListener : function(fn, scope){ var list = this.listeners, i = list.length, - l, - s; - while(i--) { + l; + + scope = scope || this.obj; + while(i--){ l = list[i]; - if(l) { - s = l.scope; - if(l.fn == fn && (s == scope || s == this.obj)){ + if(l){ + if(l.fn == fn && l.scope == scope){ return i; } } @@ -521,6 +527,6 @@ EXTUTIL.Event.prototype = { return TRUE; } }; -})();
- +})(); + \ No newline at end of file