[TIMOB-12244] iOS; TabGroup.setActiveTab() calls ignored on a previously opened tabgroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-24T07:08:52.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2013 Sprint 01 API, 2013 Sprint 01 |
Components | iOS |
Labels | Regression, api, module_tabgroup, qe-testadded |
Reporter | Vishal Duggal |
Assignee | Vishal Duggal |
Created | 2013-01-08T11:53:53.000+0000 |
Updated | 2013-01-24T07:08:52.000+0000 |
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();
Pull against master https://github.com/appcelerator/titanium_mobile/pull/3673
Backport to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3674
CR & FR master and 30x backprot PR
tested with: SDK:3.1.0.v20130114171802, 3.0.1.v20130116154658 Studio:3.0.1.201212181159 Device: iPad2(v5.1) tabGroup.setActivTab() call is not ignored on a previously opened tabgroup.
Reopening to update labels
Reopening to update labels