Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10430] iOS: cannot add tabGroup as a property of a window or a tabGroup

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2016-10-18T19:28:09.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.0, Release 2.0.1, Release 2.1.1, Release 2.1.2, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, parity, qe-ios082012
ReporterDustin Hyde
AssigneeEric Merriman
Created2012-08-13T18:37:53.000+0000
Updated2017-03-23T21:33:13.000+0000

Description

Adding a tabGroup as a property of a window or a tabGroup results in an undefined value. This does not occur in Android or MobileWeb. This is not a regression. Logs:
iOS Console Log

[INFO] x.win == [object TiUIWindow]
[INFO] tabGroup.win == [object TiUIWindow]
[INFO] label.win == [object TiUIWindow]
[INFO] win.win == [object TiUIWindow]
[INFO] win.tabGroup == undefined
[INFO] label.tabGroup == [object TiUITabGroup]
[INFO] x.tabGroup == [object TiUITabGroup]
[INFO] tabGroup.tabGroup == undefined

Android Console Log

[INFO][TiAPI   (  407)] x.win == [object TiBaseWindow]
[INFO][TiAPI   (  407)] tabGroup.win == [object TiBaseWindow]
[INFO][TiAPI   (  407)] label.win == [object TiBaseWindow]
[INFO][TiAPI   (  407)] win.win == [object TiBaseWindow]
[INFO][TiAPI   (  407)] win.tabGroup == [object TabGroup]
[INFO][TiAPI   (  407)] label.tabGroup == [object TabGroup]
[INFO][TiAPI   (  407)] x.tabGroup == [object TabGroup]
[INFO][TiAPI   (  407)] tabGroup.tabGroup == [object TabGroup]

MobileWeb Console Log

[INFO] x.win == [object TiUIWindow] index.html:11196
[INFO] tabGroup.win == [object TiUIWindow] index.html:11196
[INFO] label.win == [object TiUIWindow] index.html:11196
[INFO] win.win == [object TiUIWindow] index.html:11196
[INFO] win.tabGroup == [object TiUITabGroup] index.html:11196
[INFO] label.tabGroup == [object TiUITabGroup] index.html:11196
[INFO] x.tabGroup == [object TiUITabGroup] index.html:11196
[INFO] tabGroup.tabGroup == [object TiUITabGroup] 
Steps to Reproduce: 1. Run Code:
var win = Ti.UI.createWindow();
var tabGroup = Ti.UI.createTabGroup();
var label = Ti.UI.createLabel();
var x = {};

x.win = win;
tabGroup.win = win;
label.win = win;
win.win = win;
win.tabGroup = tabGroup;
label.tabGroup = tabGroup;
x.tabGroup = tabGroup;
tabGroup.tabGroup = tabGroup;

Ti.API.info('x.win == ' + x.win);
Ti.API.info('tabGroup.win == ' + tabGroup.win);
Ti.API.info('label.win == ' + label.win);
Ti.API.info('win.win == ' + win.win);
Ti.API.info('win.tabGroup == ' + win.tabGroup);
Ti.API.info('label.tabGroup == ' + label.tabGroup);
Ti.API.info('x.tabGroup == ' + x.tabGroup);
Ti.API.info('tabGroup.tabGroup == ' + tabGroup.tabGroup);

alert('View Log Info...');
Actual Result: some properties have undefined values Expected Result: all properties should be the assigned type

Comments

  1. Tamila Smolich 2012-08-14

    Some properties have undefined values, when test on iOS Simulator on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.1.201208091713 Titanium SDK, build: 2.2.0.v20120813184911; 2.1.1.GA; 2.0.2.GA Running app on devices (iPad 2 (5.1.1) and iPhone 4 (4.3.5)) gets an Application Error "invalid method (create TabGroup) passed to UIModule at app.js (line 2)" iOS console log: [ERROR] Script Error = invalid method (createTabGroup) passed to UIModule at app.js (line 2).
  2. Dustin Hyde 2012-08-14

    Reopening TIMOB-2600 to address the build to device runtime behavior.
  3. Shameer Jan 2013-03-27

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  4. Hans Knöchel 2016-10-18

    A TabGroup is a top-level container like the Window, so it should not be added to another top-level container. The same isn't allowed natively as well as apps that try this might be rejected by Apple.
  5. Lee Morris 2017-03-23

    Closing ticket as invalid with reference to the previous comments.

JSON Source