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

Alloy <Require> doesn't care about the platform attr (parent or itself)


    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Alloy 1.3.1
    • Fix Version/s: Alloy 1.4.0
    • Component/s: Tooling
    • Environment:

      Ti SDK 3.2.3.GA, 3.2.2.GA, Android, Alloy 1.3.1, osX


      Having separate views per platform in the same xml, if we require a file that exists only in the specific folder the alloy compiler will die when trying to compile for the other platform.


      	<Window class="container" platform="ios">
      		<Label id="label" onClick="doClick">Hello, World</Label>
      	        	<Require src="toRequire"/>  
      	<Window class="container" platform="android">
      		<Label id="label" onClick="doClick">Hello, World</Label>

      Trying to compile for android will lead to this:

      Alloy compile error

      [INFO]  ----- MVC GENERATION -----
      [INFO]  [global style] loading from cache...
      [INFO]  [index.xml] view processing...
      [INFO]    style:      "index.tss"
      [INFO]    view:       "index.xml"
      [ERROR] view "toRequire" does not exist.
      [ERROR] The following paths were inspected:
      [ERROR] /Volumes/Work/tst/app/views/android/toRequire
      [ERROR] /Volumes/Work/tst/app/views/toRequire
      [ERROR] Alloy compiler failed

      toRequire.xml needs to exist ONLY in the app/views/ios folder for the bug to show up.

      The workaround is to create an empty <Alloy/> file in the android folder with the same name (toRequire.xml)


          Issue Links



              • Assignee:
                skypanther Tim Poulsen
                rborn Dan Tamas
              • Watchers:
                7 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