Results 1 to 2 of 2

Thread: No Event Handling with packaged app

  1. #1
    Sencha User das_ricardo's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    16
    Vote Rating
    3
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •