-
29 Mar 2013 7:56 AM #1
No Event Handling with packaged app
No Event Handling with packaged app
Hello,
first , sorry for my bad english. I am not a native speaker.
OK, i build my app with the following command:
Everything seams fine, no warning and i can open the app in the browser, no error messages. But when i tap on a button, nothing happens.PHP Code:sencha app build package
If i run the same app from the server, everthing works like a charm. The tap event is fired.
SenchaCmd: 3.1.0.256
SenchaSdk: 2.1.1
Whats wrong?
OK, after some experiments i found out, if i use this source to add the buttons as items to a container:
the events fires correct.PHP Code:{
xtype: 'button', id: 'button1', text: 'button', iconCls: 'home', iconAlign: 'top', ui: 'action', iconMask: true
}
If i use this source:
the events doesnt fire.PHP Code:new Ext.create('Ext.Button', { id: 'index-tab', text: localize['de']['index'], iconCls: 'bookmarks', iconAlign: 'top', ui: 'action', iconMask: true }),
-
31 Mar 2013 7:34 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
There are two ways to create a component (without the others using xtype):
orCode:Ext.create('Ext.Button', {...})
You seem to be mixing them doing:Code:new Ext.Button({...})
Where you are putting the new keyword in there where you shouldn't.Code:new Ext.create('Ext.Button', {...})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.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote