Results 1 to 3 of 3

Thread: listener not working on a ToolBar

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1320 in a recent build.
  1. #1
    Sencha User chris_nl's Avatar
    Join Date
    Nov 2011
    Location
    Amstedam
    Posts
    34
    Vote Rating
    0
      0  

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

    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    18
      0  

    Default

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

Posting Permissions

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