{ "id": "81338", "key": "TIMOB-5496", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2011-10-11T19:13:19.000+0000", "created": "2011-10-10T11:27:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "look1" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:05:31.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": "An include_once function, such as what can be found in PHP would be extraordinarily useful on the mobile side to help prevent unnecessary duplicate inclusion in the same context.\r\n\r\nA good example is with the use of the date.js library. Including it twice in the same context results in recursion errors whenever the library's .toString() function is used (because it stores the prototype .toString in a new variable and replaces it with its own, the second include makes it replace the prototype backup with the custom function). Having the ability to use Ti.include_once() to prevent a file from being loaded twice would keep such an error from happening to begin with.", "attachment": [], "flagged": false, "summary": "Have an include_once function", "creator": { "name": "shauna", "key": "shauna", "displayName": "Shauna", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shauna", "key": "shauna", "displayName": "Shauna", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "168895", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Just to be bear in mind, this is a very simple function to create yourself in javascript, so I doubt this will be a high priority. Having said that, I will move it to the main project for the core team's consideration.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-11T16:45:08.000+0000", "updated": "2011-10-11T18:39:14.000+0000" }, { "id": "168938", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Shauna\r\n\r\nbtw, require() does this, or you can implement include_once as a file read and eval.\r\nPlease open a Q&A question if you need more help with this.\r\n\r\nMarking resolved.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-11T19:13:47.000+0000", "updated": "2011-10-11T19:13:47.000+0000" }, { "id": "168965", "author": { "name": "shauna", "key": "shauna", "displayName": "Shauna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Paul\r\n\r\nThat's good to know. Perhaps it should be more prominent in the docs? The only reference I can find to require() is one instance in KS that doesn't really say much (and, in fact, seems to suggest that it's only for CommonJS stuff, which may not be useful for files that don't follow the commonJS standard, and has a known issue for not working on distribution builds - http://developer.appcelerator.com/question/125313/error-using-require-and-packaging-app-android).", "updateAuthor": { "name": "shauna", "key": "shauna", "displayName": "Shauna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-12T03:38:26.000+0000", "updated": "2011-10-12T03:38:26.000+0000" }, { "id": "414407", "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-21T21:05:31.000+0000", "updated": "2017-03-21T21:05:31.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }