{ "id": "163281", "key": "TIMOB-23917", "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": "2016-09-18T10:37:11.000+0000", "created": "2016-09-18T06:41:52.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:02:20.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": "When I call popToRootWindow method on my NavigationWindow instance, I get an error telling me it's undefined function.\r\n\r\n*Test Case:*\r\n{code}\r\nvar i = 0;\r\nvar MAX_WINDOWS = 3;\r\nvar nav = Ti.UI.iOS.createNavigationWindow({window: createWindow(++i)});\r\n \r\nnav.open();\r\n \r\nfunction createWindow(num) {\r\n var win = Ti.UI.createWindow({title: \"Window \" + num, backgroundColor: \"#fff\"});\r\n var btn = Ti.UI.createButton({title: (i == MAX_WINDOWS) ? \"Close all windows\" : (\"Open Window \" + (num + 1))});\r\n \r\n win.addEventListener(\"close\", function() {\r\n Ti.API.warn(\"Closing \" + this.title);\r\n });\r\n \r\n btn.addEventListener(\"click\", function() {\r\n \r\n if (i == MAX_WINDOWS) {\r\n nav.popToRootWindow();\r\n i = 0;\r\n return;\r\n }\r\n nav.openWindow(createWindow(++i));\r\n });\r\n \r\n win.add(btn);\r\n return win;\r\n}\r\n{code}\r\n\r\n*Steps to reproduce the issue:*\r\n- Run the sample code on simulator.\r\n- Click on Open Window 2 button\r\n- Next, click on Open window 3 button\r\n\r\nNow click on Close all windows button and it'll return following error:\r\n{code}\r\n[ERROR] : message = \"undefined is not a function (evaluating 'nav.popToRootWindow()')\";\r\n{code}\r\n\r\n*Helpful link:*\r\nhttp://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.NavigationWindow-method-popToRootWindow\r\n\r\nThanks.", "attachment": [], "flagged": false, "summary": "iOS: popToRootWindow( ) method returns undefined is not a function error", "creator": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "environment": "Appcelerator Command-Line Interface, version 5.4.0\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11\r\n Architecture = 64bit\r\n CPUs = 4\r\n Memory = 8.0GB\r\n\r\nNode.js\r\n Node.js Version = 4.2.2\r\n npm Version = 2.14.7\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.7\r\n Core Package = 5.4.0\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.9\r\n node-appc Version = 0.2.31\r\n\r\nTitanium SDKs: 5.5.0.GA, 5.4.0.GA\r\n iOS simulator: iOS 9.2\r\n", "comment": { "comments": [ { "id": "396457", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The {{popToRootWindow}} method is (like stated in the docs) only available in Titanium SDK 6.0.0 that is not released, yet. But it is another reminder to us that we should only publish docs of the current branch, not for unreleased software (cc [~cng] [~bimmel])", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-18T10:37:12.000+0000", "updated": "2016-09-18T10:37:12.000+0000" }, { "id": "415614", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:02:20.000+0000", "updated": "2017-03-24T18:02:20.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }