{ "id": "61345", "key": "TIMOB-713", "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": [ { "id": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:00.000+0000", "created": "2011-04-15T02:35:00.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:00.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": "{html}

from premium ticket

\n

http://helpdesk.appcelerator.net/tickets/1758

\n

put this code in app.js

\n

// this sets the background color of the master UIView (when\nthere are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');

\n

// create tab group var tabGroup =\nTitanium.UI.createTabGroup();

\n

// // create base UI tab and root window // var win1 =\nTitanium.UI.createWindow({

\n
\ntitle:'Tab 1',\nbackgroundColor:'#fff'\n
\n

}); var tab1 = Titanium.UI.createTab({

\n
\nicon:'KS_nav_views.png',\ntitle:'Tab 1',\nwindow:win1\n
\n

});

\n

var showBtn = Titanium.UI.createButton({title:\"Show tab\ngroup\",width:200,height:50});
\nshowBtn.addEventListener('click',function(){

\n
\nshowTabGroup2();\n
\n

}); win1.add(showBtn);

\n

// // add tabs // tabGroup.addTab(tab1);

\n

// open tab group tabGroup.open();

\n

// create and show second tab group var tabGroup2;

\n

function buildTabGroup2() {

\n
\ntabGroup2 = Titanium.UI.createTabGroup();\n// window\nvar tg2Win = Ti.UI.createWindow({\n    title:'TEST',\n    top:0\n}); \nvar btn = Titanium.UI.createButton({title:\"Hide tab group\",height:50,width:200});\nbtn.addEventListener('click',function(){\n    Ti.API.info('BOO ' + tabGroup2);\n    tabGroup.close({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});\n\n});\ntg2Win.add(btn);\n
\n

// tg2Win.hideTabBar();

\n
\nvar tab = Titanium.UI.createTab({\n    title:'TEST',\n    window:tg2Win\n});\ntabGroup2.addTab(tab);\n
\n

} function showTabGroup2() {

\n
\nif(!tabGroup2) buildTabGroup2();\n\ntabGroup2.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_DOWN});\n
\n

}

{html}", "attachment": [], "flagged": false, "summary": "two tab groups, closing one causes crash", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123873", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [6efe824c0efe070d7187de23fe58468066c974c1])\nCloses #713: Extraneous call to [self detatchView].\n\nhttp://github.com/appcelerator/titanium_mobile/commit/6efe824c0efe0...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:35:00.000+0000", "updated": "2011-04-15T02:35:00.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }