[AC-763] Alloy Global array reload issue
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-09-30T03:02:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | adam Kearsley |
Assignee | Shak Hossain |
Created | 2015-05-11T08:12:37.000+0000 |
Updated | 2016-03-08T07:37:01.000+0000 |
Description
Steps to Reproduce
Create an array in alloy.js Alloy.Globals.myArray = [];
in index.js add Ti.API.info(Alloy.Globals.myArray.length);
Run the application.
Close and re-run OR modify the app to make a live reload.
RESULT: Error Alloy.Globals.myArray is undefined
Editing the alloy.js file and saving it (forcing a reload) seems to pick the alloy file up again.
Actual Result
Error Alloy.Globals.myArray is undefined
Expected Result
[INFO] : 0
Attachments
Hello, We have tested this issue in updated environment. It’s working as expected . *Test Environments:* CLI Version = 4.0.1 Titanium SDK Version = 4.1.0.GA Android: Google Galaxy Nexus - 4.1.1 - API 16 - 720x1280 Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.3 *Steps to Reproduce:* 1.Create an array in alloy.js 2.Create a button and add a click event on it in index.xml. 3.In index.js add Ti.API.info(Alloy.Globals.myArray.length) in function doClick. 4.Run the application. *Test code:* *alloy.js*
*index.xml*
*index.js*
*Test Result:* length is 0
Thanks