-
17 Mar 2011 10:58 AM #1
[CLOSED]Ext.util.Observable.listeners documentation is confusing
[CLOSED]Ext.util.Observable.listeners documentation is confusing
The example given for "listeners" isn't very helpful. First, the listener added refers to the undocumented 'el' property:
click: {
element: 'el', //bind to the underlying el property on the panel
fn: function(){ console.log('click el'); }
},
Second, it does not specify that a simple syntax for component events is available. An example such as the following would help:
listeners: { render: function () { console.log('in render'); } }
Finally, the documentation does not describe the options shown ("element" and "fn"). It refers to documentation elsewhere which does not directly show the config options, and itself refers to yet another piece of documentation (that's 3 degrees of separation).
If this documentation just showed the two possible forms and said "the second form can use any config options available when adding an individual listener" it would be clearer.
Thanks!
-
20 Mar 2011 5:11 PM #2
The docs say to see the addListener method, which contains all the detailed information about binding events.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[CLOSED] Documentation API Ext.util.Functions
By deister in forum Ext 3.x: BugsReplies: 2Last Post: 13 Oct 2010, 4:13 AM -
Ext.util.Observable addListener bug with IE
By verr in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 20 Aug 2010, 2:11 AM -
Ext.util.Observable();
By kamakrane in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 6 Nov 2009, 11:43 AM -
Ext.util.Observable.addEvents ???
By chalu in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 2 Jun 2008, 5:54 AM


Reply With Quote