{ "id": "150073", "key": "TIMOB-19305", "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": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-08-14T18:25:48.000+0000", "created": "2015-07-31T20:09:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Alloy", "Windows" ], "versions": [], "issuelinks": [ { "id": "48615", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "150184", "key": "AC-288", "fields": { "summary": "Employee Directory sample app will not run in Windows", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48617", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "149184", "key": "TIMOB-19084", "fields": { "summary": "Windows: _ undefined in Alloy apps", "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 } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-09-03T18:43: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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "In iOS and Android I am able to access the Alloy.Globals without require in the Alloy module, but in Windows I have to require the module:\r\n\r\nvar Alloy = require('alloy');\r\n\r\nBefore I can use the Globals variables like custom ones defined in the alloy.js file.\r\n\r\nAs I said for iOS and Android this is not needed.\r\n\r\nI am not sure which is wrong and right here, because in the Alloy.Controller documentation it states that to be able to reach Alloy.createController or the collections one needs to require first, but this is not true for iOS and Android, maybe this is by chance it works for iOS and Android? I do not know.\r\n\r\nTo reproduce:\r\n\r\nModule: (in the /lib folder)\r\n\r\n//var Alloy = require('alloy');\r\nexports.test = function(){\r\n\tTi.API.info('Test Module');\r\n\tTi.API.info('Module Wintop ' + Alloy.Globals.winTop);\r\n};\r\n\r\nIn alloy.js:\r\n\r\nAlloy.Globals.winTop = 6;\r\nTi.API.info('Wintop ' + Alloy.Globals.winTop);\r\nvar t = require('testmod');\r\nt.test();\r\n\r\nCode will crash unless the require is included, but only for Windows...\r\n", "attachment": [], "flagged": false, "summary": "Alloy.Globals not accessible from a commonjs module", "creator": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 466, "state": "closed", "name": "2015 Sprint 16 Windows", "startDate": "2015-08-03T04:01:41.284Z", "endDate": "2015-08-15T03:59:00.000Z", "completeDate": "2015-08-14T20:06:52.383Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "359884", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi \r\n\r\nJust tested the latest build of Ti SDK still not works..\r\n\r\n4.2.0.v20150813145415\r\n\r\nJust FYI\r\n\r\nThanks\r\n\r\n/Jörgen", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-08-14T08:17:52.000+0000", "updated": "2015-08-14T08:17:52.000+0000" }, { "id": "359897", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/402", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-14T11:50:42.000+0000", "updated": "2015-08-14T11:50:42.000+0000" }, { "id": "362193", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nWindows 8.1\r\nAppc CLI Core: 5.0.0-33\r\nAppc CLI NPM: 4.2.0-1\r\nTitanium SDK: 5.0.0.v20150902095518\r\nNokia Lumia 930 8.1\r\n\r\nUsing the provided test case Alloy.Globals are now accessible from a commonjs module\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-09-03T18:43:12.000+0000", "updated": "2015-09-03T18:43:12.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }