Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-753] iPhone: Unable to to fetch order of tabs within a tabGroup

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-09-11T02:30:45.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0
ComponentsiOS
Labelsapi, module_tabgroup, qe-review, qe-testadded
ReporterJordan de Laune
AssigneeNeeraj Gupta
Created2011-04-15T02:35:43.000+0000
Updated2012-09-11T02:30:45.000+0000

Description

If a user re-arranges tabs via the edit button in the more window then you are unable to fetch the new order to return the app to the previous state on close.

tabGroup.tabs property is always in the order they were originally set.

Can I suggest we add an index property to Titanium.UI.Tab? Or maybe a property on Titanium.UI.TabGroup?

Comments

  1. Vikramjeet Singh 2011-07-28

    Bug Scrub: Valid. No test case exists
  2. Junaid Younus 2012-08-13

    Tested with the iOS simulator using TiSDK 2.2.0v20120810194112 with TiStudio 2.1.1.201207271312, issue seems to be fixed. Here is the code that I used:
       function returnWindow()
       {
           return Ti.UI.createWindow({backgroundColor: 'white'});
       }
       
       function createTab(_i)
       {
           return Ti.UI.createTab({window: returnWindow(), title: 'Tab ' + _i});
       }
       
       var tabGroup = Ti.UI.createTabGroup();
       
       for (var i = 0; i < 10; i++)
       {
           var tab = createTab(i);
           
           tabGroup.addTab(tab);
       }
       
       tabGroup.open();
       
       
       setInterval(function()
       {
           var tabs = tabGroup.tabs;
           var string = '';
           
           for (var i = 0; i < tabs.length; i++)
           {
               string += ' | ' + tabs[i].title;
           }
           
           Ti.API.info('tabGroup.tabs: ' + string);
           
       }, 5000);
       
  3. Anshu Mittal 2012-08-31

    Verified on: SDK:2.2.0.v20120830182512 Studio:2.2.0.v20120830182512 Devices: iOS simulator, Android Emulator
  4. Shyam Bhadauria 2012-09-11

    Re-opening to edit label

JSON Source