{ "id": "125099", "key": "TIMOB-16264", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-01-21T15:20:19.000+0000", "created": "2014-01-21T04:50:16.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T22:04:01.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Actual Behavior\r\nWhen loading a SplitWindow from a require in the older 'bootstrapped' styled project structure, the following error occurs:\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] backtrace = \"#0 () at file:///Users/stephenfeather/Library/Application%20Support/iPhone%20Simulator/7.0.3/Applications/E597C56F-5A4C-429F-8486-B2E5B89AB74B/testing-classic.app/app.js:2\";\r\n[ERROR] line = 12;\r\n[ERROR] message = \"Invalid type passed to function\";\r\n[ERROR] nativeLocation = \"-[TiUIiOSNavWindowProxy rootController] (TiUIiOSNavWindowProxy.m:238)\";\r\n[ERROR] nativeReason = \"expected: TiWindowProxy, was: (null)\";\r\n[ERROR] sourceId = 301599424;\r\n[ERROR] sourceURL = \"file:///Users/stephenfeather/Library/Application%20Support/iPhone%20Simulator/7.0.3/Applications/E597C56F-5A4C-429F-8486-B2E5B89AB74B/testing-classic.app/bootstrap.js\";\r\n\r\n{code}\r\n\r\nh3. Expected Behavior\r\nExpect SplitWindow to load NavWindows properly without error.\r\n\r\nh3. Observations\r\nConsole.logs show that each object and child object seem to be of the proper type, \r\n{code}\r\n[INFO] [object TiUIiPadSplitWindow]\r\n[INFO] [object TiUIiOSNavWindow]\r\n[INFO] [object TiUIWindow]\r\n[INFO] [object TiUIiOSNavWindow]\r\n[INFO] [object TiUIWindow]\r\n{code}\r\nyet it would appear thats not exactly true at the time the NavWindow was created, as the null was received instead of the actual window object. Tickets regarding a similar error with TabGroups appeared around 3.1.3.\r\n\r\nYou can see that the problem exists between the NavWindows and their children, by not opening the splitView, but instead, try to open the NavWindows:\r\n{code}\r\nsplitWindow.detailView.open();\r\n{code}\r\n\r\nOpening the child windows, works:\r\n{code}\r\nsplitWindow.detailView.win.open();\r\n{code}\r\n\r\n(yeah, I know, odd way to find it)\r\n\r\nh3. Test Case\r\n\r\napp.js\r\n{code}\r\nvar app = require('/bootstrap');\r\napp.launch();\r\n{code}\r\n\r\nbootstrap.js\r\n{code}\r\nexports.launch = function(){\r\n\tSplitWindow = require('/splitview').tabletMenu;\r\n\tvar splitWindow = new SplitWindow;\r\n\r\n\t// Logs to show that objects appear to be of correct types\r\n\tconsole.log(splitWindow);\r\n\tconsole.log(splitWindow.detailView);\r\n\tconsole.log(splitWindow.detailView.win);\r\n\tconsole.log(splitWindow.masterView);\r\n\tconsole.log(splitWindow.masterView.win);\r\n\t\r\n\tsplitWindow.open();\r\n}\r\n{code}\r\n\r\nsplitview.js\r\n{code}\r\nexports.tabletMenu = function(){\r\n\tvar masterWin = Ti.UI.createWindow({\r\n\t\tlayout: 'vertical', backgroundColor: '#eee', barColor: '#000000'\r\n\t});\r\n\r\n\tvar detailsWin = Ti.UI.createWindow({backgroundColor: '#333'});\r\n\r\n\tvar masterNavWin = Ti.UI.iOS.createNavigationWindow({\r\n\t\twin: masterWin});\r\n\r\n\tvar detailsNavWin = Ti.UI.iOS.createNavigationWindow({\r\n\t\twin: detailsWin\r\n\t});\r\n\r\n\tvar self = Ti.UI.iPad.createSplitWindow({\r\n\t\torientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.PORTRAIT],\r\n\t\tdetailView: detailsNavWin,\r\n\t\tmasterView: masterNavWin\r\n\t});\r\n\r\n\treturn self;\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Nav Windows loaded into an iPad SplitView fail to load their child window with message = \"Invalid type passed to function\"", "creator": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.2.0.GA\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.9.1\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 24.0GB\r\n\r\nNode.js\r\n Node.js Version = 0.10.15\r\n npm Version = \r\n\r\nTitanium CLI\r\n CLI Version = 3.2.0\r\n node-appc Version = 0.2.0\r\n\r\n\r\n3.2.0.GA\r\n Install Location = /Users/stephenfeather/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA\r\n Platforms = iphone, tizen, mobileweb, android, blackberry\r\n git Hash = d9182d6\r\n git Timestamp = 12/20/13 10:56\r\n node-appc Version = 0.2.0\r\n\r\n\r\nXcode\r\n 5.0.2 (build 5A3005) - Xcode default\r\n Install Location = /Applications/Xcode.app/Contents/Developer\r\n iOS SDKs = 7.0.3\r\n iOS Simulators = 6.1, 7.0.3\r\n Supported by TiSDK 3.2.0.GA = yes\r\n\r\nTested on simulator (7.0.3), iPad 4 (7.0.4)\r\n", "comment": { "comments": [ { "id": "288976", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue on iPad simulator with 3.2.0 SDK.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T06:29:41.000+0000", "updated": "2014-01-21T06:29:41.000+0000" }, { "id": "289011", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Bah. createNavigationWindow takes *window* and not *win* for its child.\r\nClose this.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-21T12:38:57.000+0000", "updated": "2014-01-21T12:38:57.000+0000" }, { "id": "289022", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks, Stephen for letting us know. Resolving as invalid based on customer feedback.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T15:20:19.000+0000", "updated": "2014-01-21T15:20:19.000+0000" }, { "id": "414037", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T22:04:01.000+0000", "updated": "2017-03-20T22:04:01.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }