{ "id": "117836", "key": "TIMOB-14721", "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": [ { "id": "15576", "description": "2013 Sprint 16", "name": "2013 Sprint 16", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "15579", "description": "2013 Sprint 16 Tooling", "name": "2013 Sprint 16 Tooling", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-08-07T01:40:50.000+0000", "created": "2013-07-31T21:09:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-closed-3.2.0" ], "versions": [], "issuelinks": [ { "id": "30562", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "104896", "key": "TIMOB-11752", "fields": { "summary": "Android: Globals not accessible in CommonJS modules", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "30563", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "109458", "key": "TIMOB-12648", "fields": { "summary": "TiAPI: Create a \"global\" variable", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-02T09:23:35.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": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "Variable defined in the `app.js` are not globally available. This is due to the project's app.js being executed outside of first loaded app.js context.\r\n\r\nTEST Normal\r\n1) Create app with code snippets below\r\n2) Build app\r\nResult: console will output 'Lex Scope Var'\r\n\r\nTEST Liveview\r\n1) Create app with code snippets below\r\n2) Build app with --liveview flag\r\n\r\nExpected Result: console will output 'Lex Scope Var'\r\nActual Result: error due to lexvar not being defined\r\n\r\nExample Code\r\n\r\n{code}\r\n//app.js\r\nvar lexvar = 'Lex Scope Var';\r\nvar require('test');\r\n{code}\r\n\r\n\r\n{code}\r\n//test.js\r\nconsole.log(lexvar);\r\n{code}", "attachment": [], "flagged": false, "summary": "LiveView: App.js Lexical Scope local vars not globally available ", "creator": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "264440", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "From Tony:\n\nTo get around this issue, developers would need to explicitly re-require Alloy:\n\n{code}\nvar Alloy = require('alloy');\n{code}\n\nAnd there's also underscore(_) and Backbone to worry about as well. Those require statements are part of every Alloy-generated controller, but anything in the developer's \"lib\" or \"assets\" folder I have no control over. In those situations developers are relying on the global presence of Alloy. And they do it a lot, as it was one of the most asked Q&A questions until Android made them global as well.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-01T16:38:57.000+0000", "updated": "2013-08-01T16:38:57.000+0000" }, { "id": "265019", "author": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added support for injecting local lexical scope vars in user's app.js in to the project's 'Global' context https://github.com/euforic/liveview/tree/bug/TIMOB-14721\n", "updateAuthor": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-05T23:23:18.000+0000", "updated": "2013-08-05T23:23:18.000+0000" }, { "id": "265054", "author": { "name": "mxia", "key": "mxia", "displayName": "Michael Xia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~csullivan] I'm getting a 404 when clicking on the link. Is the branch pushed to remote yet?\n", "updateAuthor": { "name": "mxia", "key": "mxia", "displayName": "Michael Xia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-06T02:41:08.000+0000", "updated": "2013-08-06T02:41:08.000+0000" }, { "id": "265063", "author": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's already part of master. ", "updateAuthor": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-06T05:50:54.000+0000", "updated": "2013-08-06T05:50:54.000+0000" }, { "id": "265233", "author": { "name": "mxia", "key": "mxia", "displayName": "Michael Xia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening as running Field Service app is showing the following error:\r\n\r\n{code}\r\n[LiveView] Client connected\r\n[ 'Alloy', '_', 'Backbone', 'e', 'APP' ]\r\n[INFO] : [LiveView] Error Evaluating app.js @ Line: 1\r\n[ERROR] : ReferenceError: Can't find variable: e\r\n[ERROR] : File: app.js\r\n[ERROR] : Line: 1\r\n[ERROR] : SourceId: 341460448\r\n[ERROR] : Backtrace:\r\n[ERROR] : #0 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:628\r\n[ERROR] : #1 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:493\r\n[ERROR] : #2 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:460\r\n[ERROR] : #3 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:392\r\n[ERROR] : #4 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:663\r\n{code}\r\n", "updateAuthor": { "name": "mxia", "key": "mxia", "displayName": "Michael Xia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-06T22:47:55.000+0000", "updated": "2013-08-06T22:47:55.000+0000" }, { "id": "265279", "author": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "fixed in [master] https://github.com/appcelerator/liveview/commit/d0901508657d4c11479cddb4a050574069f99076\n\nReleased in version 0.1.30 https://github.com/appcelerator/liveview/releases/tag/0.1.30\n", "updateAuthor": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T01:38:22.000+0000", "updated": "2013-08-07T01:38:22.000+0000" }, { "id": "286467", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with test Environment:\r\nAppc-Studio: 3.2.0.201312191455\r\nSdk:3.2.0.GA\r\nacs:1.0.11\r\nalloy:1.3.0\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processor:1.1.0\r\nOsx: Maverick 10.9\r\nXcode: xCode 5.0.2\r\nDevice: Google Nexus7(v4.4.2),Iphone Simulator(v7.0.3)\r\n\r\nGetting the required console logs with both liveView enabled and disabled.\r\nHence alosing as fixed and Verified.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-02T09:23:35.000+0000", "updated": "2014-01-02T09:23:35.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }