[TIMOB-10430] iOS: cannot add tabGroup as a property of a window or a tabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2016-10-18T19:28:09.000+0000 |
Affected Version/s | Release 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/s | n/a |
Components | iOS |
Labels | api, parity, qe-ios082012 |
Reporter | Dustin Hyde |
Assignee | Eric Merriman |
Created | 2012-08-13T18:37:53.000+0000 |
Updated | 2017-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
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).
Reopening TIMOB-2600 to address the build to device runtime behavior.
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
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.
Closing ticket as invalid with reference to the previous comments.