Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1320 in 2.0.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    32
    Vote Rating
    0
    chrismobile is on a distinguished road

      0  

    Default listener not working on a ToolBar

    listener not working on a ToolBar


    Ext version tested:
    · Sencha Touch 2.0PR3

    Browser versions tested against:
    · Chrome 16 (Windows)
    · Safari 5.1.2 (Windwos)

    Tested on Iphone and Android phone as well


    Description:
    · Ext.Toolbar -listeners object or element object does not work when setting up the listener
    through the Toolbar properties.
    (It works only when using toolbar.element.on('tap', function() { alert('tap toolbar')});

    Steps to reproduce the problem:
    · Create an Ext.Toolbar and setup a listener

    The result that was expected:
    · The alert should be shown

    The result that occurs instead:
    · I dont know.

    Test Case:

    Code:
    Ext.require([
        'Ext.Toolbar'
    ]);
    
    
    Ext.setup({
        tabletStartupScreen: 'tablet_startup.png',
        phoneStartupScreen: 'phone_startup.png',
        icon: 'icon.png',
        glossOnIcon: false,
        fullscreen: true,
    
    
        onReady: function() {
    
    
            var toolbar = Ext.create('Ext.Toolbar', {
                docked: 'top',
                title: 'MAIN TITLE',
                listeners : {
                    el : {
                        tap : function (e, t) {
                            console.log('tap toolbar?')
                        }
                     }
                }
            });
    
    
            // toolbar.element.on('tap', function() {alert('tap toolbar')});
             Ext.Viewport.add([toolbar])
        }
    });
    See this URL for live test case
    http://www.le-ri-crystal.nl/spiritue...olbartest.html

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    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


    Not sure if you did but please don't change the title to try and mark this as an open bug.
    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.

  3. #3
    Sencha - Sencha Touch Dev Team Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    9
    Jacky Nguyen will become famous soon enough Jacky Nguyen will become famous soon enough

      0  

    Default


    As of PR4 release, please follow the instruction in this thread to use the new API
    Sencha Touch Lead Architect