Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    73
    Vote Rating
    1
    elad101 is on a distinguished road

      0  

    Default Moving between to tabs in a bottom tabBar Issue

    Moving between to tabs in a bottom tabBar Issue


    Hi,

    I've created an app with a bottom tabBar,
    each tab has its own panel that when I tapped on the tab it will redirect me to the panel (that works great).
    I've added two situations: Logged In and not logged in:
    When I logged in I expect that the tab handler will transfer me to the default tab but when I logged out I expect it to transfer to another tab.
    This is not working fine: when I'm not logged in and tapping on the tab, the application hangs 10-15 sec and then transfer me to the correct tab.

    To be more clear:
    1. I have app with a tabBar
    2. For one tab I have to states: login and logout
    3. When I logged in it should redirect me to one panel and when not to another.
    4. The first option above works just fine but the for the second it takes ~10-15sec to redirect (It looks like the app hangs..)

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


    Can I get some sort of test case?
    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
    Feb 2012
    Posts
    73
    Vote Rating
    1
    elad101 is on a distinguished road

      0  

    Default


    Code:
    /*
     * File: app/view/MainTabPanel.js
     *
     * This file was generated by Sencha Architect version 2.0.0.
     * http://www.sencha.com/products/architect/
     *
     * This file requires use of the Sencha Touch 2.0.x library, under independent license.
     * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
     * details see http://www.sencha.com/license or contact license@sencha.com.
     *
     * This file will be auto-generated each and everytime you save your project.
     *
     * Do NOT hand edit this file.
     */
    
    Ext.define('Casino.view.MainTabPanel', {
        extend: 'Ext.tab.Panel',
        alias: 'widget.maintabpanel',
        requires: [
            'Casino.view.Games',
            'Casino.view.Cashier',
            'Casino.view.MyAccount',
            'Casino.view.Info',
            'Casino.view.Promotions'
        ],
    
        config: {
            id: 'homecard',
            //style: 'background-color: #00ADEE !important;',
            baseCls: 'formPanelCls',
            tabBar: {
                docked: 'bottom',
                id: 'tabBar',
                ui:'tabBarColor'
            },
            items: [
                {
                    xtype: 'games',
                    title: Messages.TOOLBARGAMES,//'Games',
                    iconCls: 'icnLobby'
                },
                {
                    xtype: 'cashier',
                    id: 'cashiercard',
                    title: Messages.TOOLBARCASHIER,//'Cashier',
                    iconCls: 'icnCashier'
                },
                {
                    xtype: 'myaccount',
                    id: 'myaccountcard',
                    title: Messages.TOOLBARMYACCOUNT,//'My Account',
                    iconCls: 'user'
                },
                {
                    xtype: 'info',
                    id: 'infocard',
                    title: Messages.TOOLBARINFO,//'Info',
                    iconCls: 'icnInfo'
                },
                {
                    xtype: 'promotions',
                    id: 'promotionscard',
                    title: Messages.TOOLBARPROMOTION,//'Promotions',
                    iconCls: 'icnHom'
                }
            ],
            listeners: [
                {
                    fn: 'onHomecardActivate',
                    event: 'activate'
                },
                {
                    fn: 'onHomecardActivateItemChanged',
                    event: 'activeitemchange'
                }
            ]
        },
    
        onHomecardActivate: function(container, newActiveItem, oldActiveItem, options) {
    
        },
        onHomecardActivateItemChanged: function(container, newActiveItem, oldActiveItem, options){
            if ((newActiveItem.getId()=="cashiercard")||(newActiveItem.getId()=="myaccountcard")){
                if(!loggedIn){
                    Ext.getCmp('main').animateActiveItem(0,{type:'pop'});
                    Ext.getCmp('gamescard').animateActiveItem(1,{type:'slide'});
                    Ext.getCmp('loginBtn').show();
                    Ext.getCmp('haveAccountBtn').show();
                    Ext.getCmp('joinnowBtn').hide();
                    /*if (oldActiveItem.getId()=="infocard"){
                        alert("1 "+newActiveItem.getId() +" old: "+oldActiveItem.getId());
                        //return true;
                    }else{
                        alert("2 "+newActiveItem.getId() +" old: "+oldActiveItem.getId());
                        return false;
                    }*/
                }
            }
            else{ 
                alert("3 "+ newActiveItem.getId() +" old: "+oldActiveItem.getId());
            }
            
        }
    });

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    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 can't run just that class. Can I get a runnable test case?
    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.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    73
    Vote Rating
    1
    elad101 is on a distinguished road

      0  

    Default


    I'm sorry,
    Here you go.

    There's a link to check it and a zip file with the project is attached.

    Steps to reproduce:
    - Click on the 3rd tab
    - need to go to it's panel but instead it'll go to 1st tab
    - Please note that there's a 10 sec delay until it will redirect to the first tab.


    http://onoapps.com/Elad/STtest/app.html
    Attached Files

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    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


    That's because you have an activate event listener and within it you have:

    Code:
    if (true){
        Ext.getCmp('main').animateActiveItem(1,{type:'flip'});
    
    }
    So what that is doing is trying to animate the item at index 1 (the 2nd tab with the action sheet) so this will never go to the 3rd tab.
    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.

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    73
    Vote Rating
    1
    elad101 is on a distinguished road

      0  

    Default


    That's correct, I don't expect it to tranfer to tab3.
    It's Just the transfer takes a lot of time...
    Can't I do anything about it?
    Maybe to catch the event before it will switch to tab3 and that cancel it and add my transfer..?

    PS
    On andriod the transfer takes ~30-50sec

    Any Ideas?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."