-
6 Dec 2011 4:55 AM #1
config listeners not working
config listeners not working
Hello,
here is test code:
is that a bug ?Code:Ext.application({ launch : function() { var b = Ext.create('Ext.Button',{ text : 'Btn', id: 'btn1', centered: true, fullscreen: true, renderTo : Ext.getBody(), width: 70, height: 70, listeners: { click : function() { alert('I was clicked in listeners!'); },// not working mouseover: function() { alert('mouseover in listeners 2!'); }// not working either } }); /* Ext.getCmp('btn1').getEl().on('mouseover', function(){ alert('I am mousseovered in on'); });//It works fine */ } });
Thank you !best regards !
-
6 Dec 2011 8:43 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
What happens when you instantiate the class and pass in the listeners there? Now the ones in the config Object will be overwritten. I would use the on method within constructor or initialize.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
6 Dec 2011 4:00 PM #3
There is no such thing as 'mouseover', 'click' and other desktop events. Available element events can be found in the Kitchen Sink > Touch Events example: http://docs.sencha.com/touch/2-0/tou...ink/index.html
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote