Details

      Description

      On SDK 3.1.0, I can close and reopen a tabgroup. On SDK 3.1.2, I can't do it any more. It's a login/logout mechanism I implement. Users can log in/log out as many times as they want.

      In the sample code, click "Log out" to close the tab group. Click "Log in" to reopen the tab group. You'll see you can do this on 3.1.0, but not 3.1.2.

      We are about to release this app, so it's kind of urgent. If possible, please fix it or provide a workaround asap (without changing this mechanism too much). Thank you.

      var tabGroup = Titanium.UI.createTabGroup();
       
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
       
      var tab1 = Titanium.UI.createTab({  
          title:'Tab 1',
          window:win1
      });
       
      var btn = Ti.UI.createButton({title:'Log out'});
      btn.addEventListener('click',function(){
          tabGroup.close();
      });
      win1.add(btn);
       
      //
      // create controls tab and root window
      //
      var win2 = Titanium.UI.createWindow({  
          title:'Tab 2',
          backgroundColor:'#fff'
      });
      var tab2 = Titanium.UI.createTab({  
          title:'Tab 2',
          window:win2
      });
       
      var label2 = Titanium.UI.createLabel({
          color:'#999',
          text:'I am Window 2',
          font:{fontSize:20,fontFamily:'Helvetica Neue'},
          textAlign:'center',
          width:'auto'
      });
       
      win2.add(label2);
       
      //
      //  add tabs
      //
      tabGroup.addTab(tab1);  
      tabGroup.addTab(tab2);  
       
      var loginWin = Ti.UI.createWindow({exitOnClose:true,navBarHidden:false,title:'Login'});
      btn2 = Ti.UI.createButton({title:'Log in'});
      loginWin.add(btn2);
      loginWin.addEventListener('click',function(){
          tabGroup.open();
      });
      loginWin.open();
      loginWin.addEventListener('open',function(){
          tabGroup.open();
      });
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwang Ping Wang
                Reporter:
                mrahman Mostafizur Rahman
                Reviewer:
                Hieu Pham
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-17511
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code