{ "id": "94055", "key": "TIMOB-9832", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-06-19T21:29:05.000+0000", "created": "2012-06-28T12:13:57.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "parity" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-19T21:29:05.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The following warning is shown when the last tab from the tabgroup is removed.\r\nh4.-[UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selected.\r\n\r\nh3.Steps to reproduce\r\n1. copy the following code to app.js\r\n2. Click on remove tab2 and remove tab1 labels. \r\n3. warning appear on the consolve\r\n\r\nh3.Current Behavior \r\nWarning is shown when removing the final tab.\r\n\r\nh3.Expected Behavior\r\nNo Warning should be shown when removing the final tab.\r\n\r\n{code}\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n  \r\nvar win1 = Titanium.UI.createWindow({  \r\n    title:'Tab 1',\r\n    backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({  \r\n    icon:'KS_nav_views.png',\r\n    title:'Tab 1',\r\n    window:win1\r\n});\r\n  \r\nvar label1 = Titanium.UI.createLabel({\r\n    color:'#999',\r\n    text:'Remove Tab1',\r\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n    textAlign:'center',\r\n    width:'auto'\r\n});\r\n  \r\nlabel1.addEventListener('click', function() {\r\n    tabGroup.removeTab(tab1);\r\n    label1 = win1 = tab1 = null;\r\n});\r\n  \r\nwin1.add(label1);\r\n \r\nvar win2 = Titanium.UI.createWindow({  \r\n    title:'Tab 2',\r\n    backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({  \r\n    icon:'KS_nav_ui.png',\r\n    title:'Tab 2',\r\n    window:win2\r\n});\r\n  \r\nvar label2 = Titanium.UI.createLabel({\r\n    color:'#999',\r\n    text:'remove tab2',\r\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n    textAlign:'center',\r\n    width:'auto'\r\n});\r\n  \r\nlabel2.addEventListener('click', function() {\r\n    tabGroup.removeTab(tab2);\r\n    label2 = win2 = tab2 = null;\r\n});\r\n \r\nwin2.add(label2);\r\n  \r\n//  add tabs\r\n  \r\ntabGroup.addTab(tab1);  \r\ntabGroup.addTab(tab2);  \r\n  \r\n// open tab group\r\ntabGroup.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Warning shown when removing the last tab from a tabgroup", "creator": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 4.3 , 5.0 and 5.1", "comment": { "comments": [ { "id": "200773", "author": { "name": "corthlieb", "key": "corthlieb", "displayName": "Carl Orthlieb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sabil, what is the wording of the warning so that people can recognize it?", "updateAuthor": { "name": "corthlieb", "key": "corthlieb", "displayName": "Carl Orthlieb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-28T12:47:49.000+0000", "updated": "2012-06-28T12:47:49.000+0000" }, { "id": "247044", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "incomplete test case", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T11:24:22.000+0000", "updated": "2013-04-11T11:24:22.000+0000" }, { "id": "422315", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am unable to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170609091155\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-19T21:29:05.000+0000", "updated": "2017-06-19T21:29:05.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }