Results 1 to 2 of 2

Thread: Adding initialize() to Ext.tab.Panel will cause tabs to not switch on click

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    26

    Default Adding initialize() to Ext.tab.Panel will cause tabs to not switch on click

    Hello.

    I don't know if it's a bug.
    If I have initialize function in Ext.tab.Panel, it will cause tabs not to switch on mouse click (only the colour will change but the tab will not slide).

    Does it mean I can't do anything on Ext.tab.Panel initialization?


    Code:
    Ext.define("OTA.view.Main", {
    	extend: 'Ext.tab.Panel',
    	id: 'otaTabPanel',
    
    	fullscreen: true,
    
    	config: {
    		tabBar: {
    			docked: 'bottom',
    			layout: {
    				pack: 'center'
    			},
    			
    		},
    		items: 
    			[
    				{ xtype: 'homepanel' },
    				{ xtype: 'configpanel' },
    				{ xtype: 'applicationspanel' }
    			]
    	},
    
    	initialize: function() { }
    });
    Sencha touch 2.3.1

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    26

    Default

    I found the answer but how do I know when it's neccessary to do it.
    That is to say, how do I know that I'm overwriting existing method. Do all events should have this.callParent() just in case?

    Code:
    initialize: function()
    { 
        this.callParent(arguments);
        // Rest of your code...
    }

Posting Permissions

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