Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-969

Variable position in compiled alloy file


    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Runtime
    • Labels:


      I declare a button with a onClick event that uses a function.
      <Button onClick="myFunc" />
      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 declared


        1. index.js
          0.2 kB
        2. index.js
          2 kB
        3. index.xml
          0.3 kB



            • Assignee:
              skypanther Tim Poulsen
              gduthieuw Guile
            • Watchers:
              3 Start watching this issue


              • Created:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration