Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-12244

iOS; TabGroup.setActiveTab() calls ignored on a previously opened tabgroup

    Details

      Description

      Setting active tab on a previously opened tab group does not work.
      Test Code

      var win = Ti.UI.createWindow({
      	backgroundColor:'white',
      	layout:'vertical'
      })
       
      var b1 = Ti.UI.createButton({
      	title:'Open activeTab 1',
      	top:5
      })
      var b2 = Ti.UI.createButton({
      	title:'Open activeTab 2',
      	top:5
      })
      var b3 = Ti.UI.createButton({
      	title:'Open activeTab tab1',
      	top:5
      })
      var b4 = Ti.UI.createButton({
      	title:'Open activeTab tab2',
      	top:5
      })
      var b5 = Ti.UI.createButton({
      	title:'Open ',
      	top:5
      })
      win.add(b1);
      win.add(b2);
      win.add(b3);
      win.add(b4);
      win.add(b5);
      var tabGrp = Ti.UI.createTabGroup();
       
      var win0 = Ti.UI.createWindow({
      	title:'TAB 0',
      	backgroundColor:'white'
      })
       
      var tab0 = Ti.UI.createTab({
      	window:win0,
      	title:'tab0'
      })
       
      var closeBtn0 = Ti.UI.createButton({
      	title:'CLOSE TABGRP'
      })
       
      win0.add(closeBtn0);
       
      var win1 = Ti.UI.createWindow({
      	title:'TAB 1',
      	backgroundColor:'white'
      })
       
      var tab1 = Ti.UI.createTab({
      	window:win1,
      	title:'tab1'
      })
       
      var closeBtn1 = Ti.UI.createButton({
      	title:'CLOSE TABGRP'
      })
       
      win1.add(closeBtn1);
       
      var win2 = Ti.UI.createWindow({
      	title:'TAB 2',
      	backgroundColor:'white'
      })
       
      var tab2 = Ti.UI.createTab({
      	window:win2,
      	title:'tab2'
      })
       
      var closeBtn2 = Ti.UI.createButton({
      	title:'CLOSE TABGRP'
      })
       
      win2.add(closeBtn2);
       
       
      tabGrp.tabs = [tab0,tab1,tab2];
       
      b1.addEventListener('click',function(){
      	tabGrp.activeTab = 1;
      	tabGrp.open();
      })
       
      b2.addEventListener('click',function(){
      	tabGrp.activeTab = 2;
      	tabGrp.open();
      })
       
      b3.addEventListener('click',function(){
      	tabGrp.activeTab = tab1;
      	tabGrp.open();
      })
       
      b4.addEventListener('click',function(){
      	tabGrp.activeTab = tab2;
      	tabGrp.open();
      })
       
      b5.addEventListener('click',function(){
      	tabGrp.open();
      })
       
      closeBtn0.addEventListener('click',function(){
      	tabGrp.close();
      })
       
      closeBtn1.addEventListener('click',function(){
      	tabGrp.close();
      })
       
      closeBtn2.addEventListener('click',function(){
      	tabGrp.close();
      })
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                vduggal Vishal Duggal (Inactive)
                Reviewer:
                Sabil Rahim
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration