[ALOY-969] Variable position in compiled alloy file
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-03-13T13:22:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Runtime |
Labels | compiler, js |
Reporter | Guile |
Assignee | Tim Poulsen |
Created | 2014-03-12T10:30:37.000+0000 |
Updated | 2018-03-07T22:28:25.000+0000 |
Description
I declare a button with a onClick event that uses a function. This function is declare as a variable var myFunc = function () {} When Alloy compile it, the variable declaration is after the Button creation with the callback definition. Then the button has an "undefined" click callback and does nothing Is there anyway to say "this code must be before alloy code, this code can be after" See attchmts: index.xml for the view example, index.js for the app/Controller file, and Resources index.js is the compiled file which show "myClick" is used before it is declaredAttachments
File | Date | Size |
---|---|---|
index.js | 2014-03-12T10:30:37.000+0000 | 204 |
index.js | 2014-03-12T10:30:37.000+0000 | 1666 |
index.xml | 2014-03-12T10:30:37.000+0000 | 285 |