{ "id": "147696", "key": "AC-763", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-30T03:02:06.000+0000", "created": "2015-05-11T08:12:37.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:01.000+0000", "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" } }, "components": [], "description": "h3. Steps to Reproduce\nCreate an array in alloy.js `Alloy.Globals.myArray = [];`\nin index.js add `Ti.API.info(Alloy.Globals.myArray.length);`\nRun the application.\nClose and re-run OR modify the app to make a live reload.\n\nRESULT: Error Alloy.Globals.myArray is undefined\n\nEditing the alloy.js file and saving it (forcing a reload) seems to pick the alloy file up again.\n\nh3. Actual Result\nError Alloy.Globals.myArray is undefined\n\nh3. Expected Result\n[INFO] : 0", "attachment": [ { "id": "55315", "filename": ".log", "author": { "name": "adamkearsley", "key": "adamkearsley", "displayName": "adam Kearsley", "active": true, "timeZone": "Europe/London" }, "created": "2015-05-11T08:12:42.000+0000", "size": 1156738, "mimeType": "text/plain" }, { "id": "55316", "filename": "diagnostic4660403502053113491.log", "author": { "name": "adamkearsley", "key": "adamkearsley", "displayName": "adam Kearsley", "active": true, "timeZone": "Europe/London" }, "created": "2015-05-11T08:12:48.000+0000", "size": 74479, "mimeType": "text/plain" } ], "flagged": false, "summary": "Alloy Global array reload issue", "creator": { "name": "adamkearsley", "key": "adamkearsley", "displayName": "adam Kearsley", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "adamkearsley", "key": "adamkearsley", "displayName": "adam Kearsley", "active": true, "timeZone": "Europe/London" }, "environment": "Appcelerator Studio 4.0.1", "comment": { "comments": [ { "id": "361075", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nWe have tested this issue in updated environment. It’s working as expected .\r\n\r\n \r\n\r\n*Test Environments:*\r\n\r\nCLI Version = 4.0.1\r\nTitanium SDK Version = 4.1.0.GA\r\nAndroid: Google Galaxy Nexus - 4.1.1 - API 16 - 720x1280\r\nAppc Studio: Appcelerator Studio, build: 4.1.1.201507141126\r\nAlloy: 1.7.3\r\n\r\n\r\n*Steps to Reproduce:*\r\n\r\n1.Create an array in alloy.js \r\n2.Create a button and add a click event on it in index.xml. \r\n3.In index.js add Ti.API.info(Alloy.Globals.myArray.length) in function doClick.\r\n4.Run the application.\r\n\r\n*Test code:*\r\n*alloy.js*\r\n{code}\r\nvar myArray = [];\r\nAlloy.Globals.myArray = myArray;\r\n{code}\r\n*index.xml*\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n{code}\r\n*index.js*\r\n{code}\r\nfunction doClick(e) {\r\n\t\r\n\tlength =Alloy.Globals.myArray.length;\r\n\tTi.API.info('length is '+length);\r\n\r\n\t\r\n} \r\n \r\n$.index.open();\r\n\r\n{code}\r\n*Test Result:* \r\nlength is 0\r\n\r\n{code}\r\n\r\nINFO] : APSAnalyticsService: Analytics Service Started\r\n[INFO] : APSAnalyticsService: Stopping Analytics Service\r\n[INFO] : length is 0\r\n\r\n{code}\r\n\r\nThanks\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-25T08:48:15.000+0000", "updated": "2015-09-30T03:01:59.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }