Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2692] activeTab undefined

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsAndroid
Labelsandroid, defect, regression, release-1.6.0, reported-1.5.1, reported-1.6.0
ReporterKevin Whinnery
AssigneeDon Thorp
Created2011-04-15T03:27:09.000+0000
Updated2011-04-17T01:59:49.000+0000

Description

In 1.5.1 and 1.6.0 as of today, the activeTab property of the tab group is undefined after the tab group is initially created. To reproduce, add the following code to a default Titanium-generated project:


tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
tabGroup.setActiveTab(tab2);

// open tab group
tabGroup.open(); 
 
Ti.API.info("tabGroup: " + tabGroup.activeTab);

Attachments

FileDateSize
app.js2011-04-15T03:27:10.000+00001616

Comments

  1. Opie Cyrus 2011-04-15

    (from [dfac4ccef9c30b6f537cb42fd81962484105209d]) [#2692 state:fixed-in-qa] rework activeTab get mechanism for TabGroup

    reworked mechanism for getting activeTab value for TabGroupProxy. If no activeTab is manually set then the activeTab will reference the first tab created. The call to getActiveTab will return the correct tab even if the tabGroup has not yet been opened. If getActiveTab is called when no tabs have been added then a runtime exception is throw since the activeTab property must return a tabProxy object rather than an index.
    https://github.com/appcelerator/titanium_mobile/commit/dfac4ccef9c30b6f537cb42fd81962484105209d"> https://github.com/appcelerator/titanium_mobile/commit/dfac4ccef9c3...

  2. Opie Cyrus 2011-04-15

    Please use attached app to verify fix.

  3. Marshall Culpepper 2011-04-15

    verified on Nexus S / 2.3.2

  4. Nikolai Derzhak 2011-04-15

    rollback wrong update

JSON Source