Titanium JIRA Archive
Alloy (ALOY)

[ALOY-929] Widget/Require includes references to child elements targeted for other platforms

GitHub Issuen/a
Resolution Date2014-01-20T15:28:58.000+0000
Affected Version/sAlloy 1.3.0
Fix Version/sAlloy 1.4.0
Labelsqe-closed-3.3.0, qe-testadded, require, widgets
ReporterFokke Zandbergen
AssigneeTony Lukasavage


Given a view like this:
  <Widget src="foo">
    <Window id="a" platform="ios" />
    <Window id="b" platform="android" />
For both iOS and Android the widget gets passed a children property including references to both $.__views.a and $.__views.b, with one of them of course not existing, so giving null in the widget when looping through them.


  1. Ritu Agrawal 2014-01-20

    Moving this ticket to engineering for further evaluation and prioritization as it appears to be a legitimate issue and not related to Titanium.
  2. Tony Lukasavage 2014-01-20

    PR: https://github.com/appcelerator/alloy/pull/301 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-929 Functional test:

    Run the test app.

    You should see output once it loads in the console.

    The output should list only one child (results are from an ios run)

       [DEBUG] [INFO]  (
       [DEBUG] [INFO]      "[object a]"
       [DEBUG] [INFO]  )
    Prior to this fix, there would be 2 children in the printed list. One child would be defined, the other would be , like this if you ran for ios:
       [DEBUG] [INFO]  (
       [DEBUG] [INFO]      "[object a]",
       [DEBUG] [INFO]      "<null>"
       [DEBUG] [INFO]  )
  3. Priya Agarwal 2014-05-14

    Verified the FIXED with: Appc-Studio: sdk:3.3.0.v20140513191712 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1),Nexus7(v4.4.2) Working as expected. Hence closing.
  4. Hazem Khaled 2016-09-26

    Issue still there with formfactor, child of zero come null with this case
       <Widget id="form" src="nl.fokkezb.form" config="forms/project_add">
           <View class="headerView" role="headerView" formFactor="tablet">
               <Label id="titleLabel"/>
           <View class="footerView" role="footerView">
               <Button id="sendButton" onClick="sendButtonClicked"/>

JSON Source