Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12244] iOS; TabGroup.setActiveTab() calls ignored on a previously opened tabgroup

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-01-24T07:08:52.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.1, Release 3.1.0, 2013 Sprint 01 API, 2013 Sprint 01
ComponentsiOS
LabelsRegression, api, module_tabgroup, qe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2013-01-08T11:53:53.000+0000
Updated2013-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();

Comments

  1. Vishal Duggal 2013-01-08

    Pull against master https://github.com/appcelerator/titanium_mobile/pull/3673
  2. Vishal Duggal 2013-01-08

    Backport to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3674
  3. Sabil Rahim 2013-01-08

    CR & FR master and 30x backprot PR
  4. Anshu Mittal 2013-01-17

    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.
  5. Anshu Mittal 2013-01-24

    Reopening to update labels
  6. Anshu Mittal 2013-01-24

    Reopening to update labels

JSON Source