1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    55
    Vote Rating
    0
    justinKohactive is on a distinguished road

      0  

    Default Tabbar skipping my view.

    Tabbar skipping my view.


    If I setActiveItem on a view port and use the same view later in a tabbar, the tabbar skips my view and goes to the next item in the tabbar do i need to remove it first from the other viewport? if so how?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    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


    Not sure I follow 100%. I have tried this code with expected behavior:

    Code:
            var tabpanel = Ext.create('Ext.tab.Panel', {
                fullscreen : true,
                items      : [
                    {
                        title : 'One',
                        html  : 'one'
                    },
                    {
                        title : 'Two',
                        html  : 'two'
                    },
                    {
                        title : 'Three',
                        html  : 'three'
                    }
                ]
            });
    
            setTimeout(function() {
                tabpanel.setActiveItem(1);
    
                //manually switch to tab 3 after it switches to the 2nd tab
            }, 1000);
    
            setTimeout(function() {
                tabpanel.setActiveItem(0);
            }, 5000);
    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.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    55
    Vote Rating
    0
    justinKohactive is on a distinguished road

      0  

    Default


    Its more like if i have

    var viewport1 = new Ext.panel()

    then a tabpanel

    var viewport2 = new Ext.tabpanel({
    items: [
    view1,view2,view3
    ]});



    then i try to attach view2 to viewport1,

    viewport1.setActiveItem(view2);

    when i try to access view2 from viewport2 via the tabbar it skips to view3.

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    You can't have the same view in 2 different containers. This will cause issues (like you are are experiencing).
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 2