1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    India
    Posts
    10
    Vote Rating
    0
    Manasi Sakhare is on a distinguished road

      0  

    Default Answered: Extending a Ext.tab.Panel disables the tab switching

    Answered: Extending a Ext.tab.Panel disables the tab switching


    Here is one thing which i noticed, when I create a custom Tab Panel by Ext.define() and then extending the Ext.tab.Panel, the "activeitemchange" event is fired only once (i.e when the component renders for the first time).

    After my custom tab panel is painted and I tap on the other tabs, the tabs do NOT switch. The contents of the first tab is shown throughout, no matter which ever tab I switch to.

    One thing to note, I m using touch-charts in my app, hence using the sencha-touch-debug.js from the touch charts package only.(Don't know how this will affect).

    Please help find a fix.. Is this a bug?

  2. You are overriding framework behavior. If the initialize method is empty then you should just remove it. If you are doing something in it then you need to execute this.callParent();

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,074
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I do not see this behavior. Do you have a testcase to look at?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Location
    India
    Posts
    10
    Vote Rating
    0
    Manasi Sakhare is on a distinguished road

      0  

    Default Some more information

    Some more information


    Using the latest touch charts sdk for Sencha touch 2 and also the latest version of sencha touch 2.0.0 gpl

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Location
    India
    Posts
    10
    Vote Rating
    0
    Manasi Sakhare is on a distinguished road

      0  

    Default Found a case where this behavior is seen

    Found a case where this behavior is seen


    When we overwrite the "initialize" function of the extended tab panel( can keep is blank also, but overwriting is imp), the active tab does not change. Why is this so?

  6. #5
    Sencha User
    Join Date
    Jan 2012
    Location
    India
    Posts
    10
    Vote Rating
    0
    Manasi Sakhare is on a distinguished road

      0  

    Default Any updates?

    Any updates?


    Quote Originally Posted by Manasi Sakhare View Post
    When we overwrite the "initialize" function of the extended tab panel( can keep is blank also, but overwriting is imp), the active tab does not change. Why is this so?
    <br><br>Any updates/clarifications on this?&nbsp;<img src="images/smilies/1.gif" border="0" alt="" title="Smile" smilieid="74" class="inlineimg">

  7. #6
    Touch Premium Member
    Join Date
    Apr 2007
    Posts
    109
    Answers
    2
    Vote Rating
    0
    hbeing123 is on a distinguished road

      0  

    Default


    I have also noticed this behaviour just having an empty initialize function on an extends tab panel stops the change event from firing.

  8. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,074
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by hbeing123 View Post
    I have also noticed this behaviour just having an empty initialize function on an extends tab panel stops the change event from firing.
    Do you execute callParent within the initialize method?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

  9. #8
    Touch Premium Member
    Join Date
    Apr 2007
    Posts
    109
    Answers
    2
    Vote Rating
    0
    hbeing123 is on a distinguished road

      0  

    Default


    No code at all actually, it's just an empty initialize function, as soon as I remove the function all together the switching works again.

  10. #9
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,074
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You are overriding framework behavior. If the initialize method is empty then you should just remove it. If you are doing something in it then you need to execute this.callParent();
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

  11. #10
    Touch Premium Member
    Join Date
    Apr 2007
    Posts
    109
    Answers
    2
    Vote Rating
    0
    hbeing123 is on a distinguished road

      0  

    Default


    this.callParent() does it for me, thanks again mitchell.

Thread Participants: 2