Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    9
    Vote Rating
    0
    das_ricardo is on a distinguished road

      0  

    Default 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:
    PHP Code:
    sencha app build package 
    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.

    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:

    PHP Code:
    {
      
    xtype'button',  id'button1',  text'button',  iconCls'home',  iconAlign'top',  ui'action',  iconMasktrue

    the events fires correct.

    If i use this source:
    PHP Code:
    new Ext.create('Ext.Button', {            id'index-tab',            textlocalize['de']['index'],            iconCls'bookmarks',            iconAlign'top',            ui'action',            iconMasktrue          }), 
    the events doesnt fire.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,656
    Vote Rating
    436
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    There are two ways to create a component (without the others using xtype):

    Code:
    Ext.create('Ext.Button', {...})
    or

    Code:
    new Ext.Button({...})
    You seem to be mixing them doing:

    Code:
    new Ext.create('Ext.Button', {...})
    Where you are putting the new keyword in there where you shouldn't.
    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.