{ "id": "130510", "key": "TIMOB-16985", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-07-28T06:59:19.000+0000", "created": "2014-05-15T12:37:59.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "breaking-change" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2018-08-06T17:49:21.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "The window.url property was a solution fit for another time in Titanium's history. That time has long since gone. Too many newbies are using window.url as if it is the correct pattern to develop their apps against.\r\n\r\nThe only reason against deprecation is that some older apps still use window.url. However using this as a reason only serves to increase the number of apps this will affect.\r\n\r\nNote: {{Ti.UI.currentWindow}} should be removed as well.", "attachment": [], "flagged": false, "summary": "TiAPI: Remove window.url property", "creator": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "environment": "All", "closedSprints": [ { "id": 682, "state": "closed", "name": "2016 Sprint 15 SDK", "startDate": "2016-07-16T00:19:20.819Z", "endDate": "2016-07-30T00:19:00.000Z", "completeDate": "2016-08-01T04:40:11.421Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "305468", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this deprecation request to engineering for further evaluation and prioritization.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-19T06:53:44.000+0000", "updated": "2014-05-19T06:53:44.000+0000" }, { "id": "336040", "author": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Doc changes are taken care of by these PRs:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6452\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6451/", "updateAuthor": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-11T18:52:45.000+0000", "updated": "2014-12-11T18:52:54.000+0000" }, { "id": "336134", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm against removal in the sense that there's no way to create a new execution context in a cross-platform manner with this API gone. This would cause [triple|https://github.com/tonylukasavage/triple] not to work anymore, or at the very least break some functionality. If we are going to remove the only means of creating a new context, we should be replacing it with a more appropriate API. I agree that hanging a {{url}} property off of {{Window}} doesn't make sense, but we should have something along the lines of node.js's [vm|http://nodejs.org/api/vm.html] module in order to allow devs to manage their own execution contexts.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-12T13:06:41.000+0000", "updated": "2014-12-12T13:06:41.000+0000" }, { "id": "336135", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-12-12T13:37:42.000+0000", "updated": "2014-12-12T13:37:42.000+0000" }, { "id": "336138", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "So... dump {{Ti.UI.Window.url}} and add {{Ti.App.createContext}} right?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-12-12T13:57:33.000+0000", "updated": "2014-12-12T13:57:33.000+0000" }, { "id": "336140", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~core13] Sounds like we're saying the same thing.\r\n\r\n[~fokke] I don't know what the exact API should be, but yes, something entirely separate from any UI element for sure.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-12T14:09:58.000+0000", "updated": "2014-12-12T14:09:58.000+0000" }, { "id": "336142", "author": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "body": "Agree the functionality shouldn't be removed - changed / re-positioned maybe if that makes sense.", "updateAuthor": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "created": "2014-12-12T14:23:53.000+0000", "updated": "2014-12-12T15:05:16.000+0000" }, { "id": "336143", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For those interested in the \"createContext\" feature, please provide a sample bit of code that demonstrates how you would use it properly.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-12T14:58:52.000+0000", "updated": "2014-12-12T14:58:52.000+0000" }, { "id": "336146", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's the chunk of code from {{triple}} that relies on {{Window.url}}, but would be better served by a true context creation API:\r\n\r\n{code:javascript}\r\n// create a new execution context with createWindow's url property\r\nfunction resetContext() {\r\n\tvar hasCurrent = !!current;\r\n\tif (hasCurrent) {\r\n\t\tcurrent.removeEventListener('close', resetContext);\r\n\t\tcurrent.removeEventListener('open', returnReset);\r\n\t\tTi.App.fireEvent('app:reset');\r\n\t}\r\n\tcurrent = Ti.UI.createWindow({\r\n\t\turl: 'context.js',\r\n\t\texitOnClose: false\r\n\t});\r\n\tcurrent.addEventListener('close', resetContext);\r\n\thasCurrent && current.addEventListener('open', returnReset);\r\n\tcurrent.open();\r\n}\r\nresetContext();\r\n{code}\r\n\r\nInstead of all those window and application event hacks, it would be nice to just have an API that either clears the current context, or creates a new one. But, that's not entirely useful unless we have APIs for executing code inside a given context, like the vm module I mentioned above. So my proposal would be implementing the {{vm}} API from node.js in Titanium (it's small). Where it goes in the namespaces is not important to me, be it {{Ti.App}} or {{Ti.VM}} or whatever.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-12T15:31:28.000+0000", "updated": "2014-12-12T15:31:28.000+0000" }, { "id": "336196", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I'm all for adding VM context support, but I'm not sold that we should put it in the Titanium namespace. I strongly believe we should design this feature to be compatible with Node.js's VM API (http://nodejs.org/api/vm.html).\r\n\r\nI think it would be great if we could implement this in a Titanium Module. This gives us a clean Titanium-free way of require()'ing the module (like node) and invoking the API.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-12-12T18:38:58.000+0000", "updated": "2014-12-12T18:38:58.000+0000" }, { "id": "336309", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber] I'm totally down with that idea. I thought I'd be the only one to propose such a radical deviation from the normal Titanium pattern, but I should have known better. Does anyone know if creating contexts is possible through the module system? On all platforms? Who can we include in this conversation to get some clarity?", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-15T01:38:52.000+0000", "updated": "2014-12-15T01:38:52.000+0000" }, { "id": "337523", "author": { "name": "ayoung2006@hotmail.co.uk", "key": "ayoung2006@hotmail.co.uk", "displayName": "Alan Young", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I would like to learn more about this sounds intresting I quite a new titanium developer so need all the helpi can get from the pro's", "updateAuthor": { "name": "ayoung2006@hotmail.co.uk", "key": "ayoung2006@hotmail.co.uk", "displayName": "Alan Young", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-28T03:11:15.000+0000", "updated": "2014-12-28T03:11:15.000+0000" }, { "id": "362280", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "McFly, Bueller, Bueller, McFly.\r\n\r\nI am sure this throw back from the dark ages feature that was signed off to be removed July last year is hanging around for a good reason - anyone have one?\r\n\r\nThe reason it was set by [~ingo] to be removed for 3.6 was due to JeffH telling him that it must be.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2015-09-04T10:30:58.000+0000", "updated": "2015-09-04T10:30:58.000+0000" }, { "id": "373620", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~cng] shouldn't breaking changes be in 6.0?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-30T07:25:28.000+0000", "updated": "2015-12-30T07:25:28.000+0000" }, { "id": "391502", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (iOS): https://github.com/appcelerator/titanium_mobile/pull/8036\r\n\r\nWe also need an Android-PR for this accordingly.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-26T09:53:35.000+0000", "updated": "2016-07-26T09:53:35.000+0000" }, { "id": "391612", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.\r\n[~msamah] ^", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-27T03:27:35.000+0000", "updated": "2016-07-27T03:27:35.000+0000" }, { "id": "391613", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Noted.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-27T03:30:16.000+0000", "updated": "2016-07-27T03:30:16.000+0000" }, { "id": "391644", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Master (6.0.0) PR to remove URL property from Window (Android): https://github.com/appcelerator/titanium_mobile/pull/8161\r\n\r\nIs there anything else that's needed? [~hansknoechel]", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-27T08:40:49.000+0000", "updated": "2016-07-27T08:56:05.000+0000" }, { "id": "391645", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "-Currently checking on the Android {{TiJSActivity}} class as well...-\r\nThat class is fine.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-27T08:48:03.000+0000", "updated": "2016-07-28T06:33:39.000+0000" }, { "id": "440131", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:21.000+0000", "updated": "2018-08-06T17:49:21.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }