Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2079

Alloy compiler failed when using Picker in ItemTemplate...

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Invalid
    • Affects Version/s: None
    • Environment:

      Description

      When I include a Picker in an ItemTemplate for a ListView I get the following error [ERROR] : : Cannot read property 'symbol' of undefined [ERROR] : Alloy compiler failed

      Here is the larger traceback

      [INFO] : view: "scoresTab.xml"
      [DEBUG] : /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.PickerColumn.js:36
      [DEBUG] : return args.symbol + '.addRow(' + state.parent.symbol + ');\n';
      [DEBUG] : ^
      [ERROR] : : Cannot read property 'symbol' of undefined
      [DEBUG] : at Object.CU.generateNodeExtended.post (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.PickerColumn.js:36:51)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:14:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:8:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at Object.exports.generateNodeExtended (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.PickerColumn.js:33:14)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.PickerColumn.js:6:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at Object.exports.generateNodeExtended (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:58:16
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:57:6)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:8:27)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Picker.js:17:31)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Picker.js:6:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at Object.exports.generateNodeExtended (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:64:15
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:54:5)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:10:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at Object.exports.generateNodeExtended (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:57:17
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:48:6
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:31:4)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:17:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:332:29
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:327:5)
      [DEBUG] : at Object.exports.generateNodeExtended (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)
      [DEBUG] : at parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Tab.js:27:14)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
      [DEBUG] : at Object.exports.parse (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Tab.js:7:27)
      [DEBUG] : at Object.exports.generateNode (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/index.js:496:28
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at parseAlloyComponent (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/index.js:493:5)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/index.js:241:6
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at /usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/index.js:233:6
      [DEBUG] : at Array.forEach (native)
      [DEBUG] : at Function..each..forEach (/usr/local/share/npm/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
      [DEBUG] : at module.exports (/usr/local/share/npm/lib/node_modules/alloy/Alloy/commands/compile/index.js:229:4)
      [DEBUG] : at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/alloy/Alloy/alloy.js:102:46)
      [DEBUG] : at Module._compile (module.js:456:26)
      [DEBUG] : at Object.Module._extensions..js (module.js:474:10)
      [DEBUG] : at Module.load (module.js:356:32)
      [DEBUG] : at Function.Module._load (module.js:312:12)
      [DEBUG] : at Module.require (module.js:364:17)
      [DEBUG] : at require (module.js:380:17)
      [DEBUG] : at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/alloy/bin/alloy:3:1)
      [DEBUG] : at Module._compile (module.js:456:26)
      [DEBUG] : at Object.Module._extensions..js (module.js:474:10)
      [DEBUG] : at Module.load (module.js:356:32)
      [DEBUG] : at Function.Module._load (module.js:312:12)
      [DEBUG] : at Function.Module.runMain (module.js:497:10)
      [DEBUG] : at startup (node.js:119:16)
      [DEBUG] : at node.js:901:3
      [ERROR] : Alloy compiler failed

      Here is the xml

      <Alloy>
      <Tab id="scoresTab" title="Scores" onFocus="doOnFocus" onBlur="doOnBlur">
      <Window id="win" title="Scores" class="container">
      <LeftNavButton platform="ios">
      <Button title="Schedule" onClick="closeMe">
      </LeftNavButton>
      <RightNavButton platform="ios">
      </RightNavButton>
      <ListView id="listView" defaultItemTemplate="body" style="Ti.UI.iPhone.ListViewStyle.GROUPED" allowsSelection="true">
      <Templates>
      <ItemTemplate id="bodyTemplate" name="body">
      <ImageView bindId="pic" id="iconId"></ImageView>
      <Label bindId="name" id="nameId"></Label>
      <Label bindId="gender" id="genderId" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER"></Label>
      <Label bindId="scale" id="scaleId" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER"></Label>
      <Label bindId="score" id="scoreId" textAlign="Ti.UI.TEXT_ALIGNMENT_RIGHT"></Label>
      </ItemTemplate>
      <ItemTemplate id="headerTemplate" name="header">
      <Label bindId="name" id="nameHeadId"></Label>
      <Label platform="ios" bindId="gender" id="genderHeadId" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER"></Label>
      <Picker platform="android" bindId="gender" id="genderHeadId" onChange="genderChange" selectionIndicator="true">
      <PickerColumn id="genderColumn">
      <PickerRow title="\uf183\u0020\u004D\u0061\u006C\u0065"></PickerRow>
      <PickerRow title="\uf182\u0020\u0046\u0065\u006D\u0061\u006C\u0065"></PickerRow>
      <PickerRow title="\uf183\u002f\uf182\u0020\u0042\u006F\u0074\u0068"></PickerRow>
      </PickerColumn>
      </Picker>
      <Label bindId="scale" id="scaleHeadId" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER"></Label>
      <Label bindId="score" id="scoreHeadId" textAlign="Ti.UI.TEXT_ALIGNMENT_RIGHT"></Label>
      <Label bindId="refresh" id="refreshHeadId" textAlign="Ti.UI.TEXT_ALIGNMENT_RIGHT"></Label>
      </ItemTemplate>
      </Templates>
      <ListSection id="headerSection">
      </ListSection>
      <ListSection id="scoreSection">
      </ListSection>
      </ListView>
      </Window>
      </Tab>
      </Alloy>

        Attachments

          Activity

            People

            • Assignee:
              ragrawal Ritu Agrawal
              Reporter:
              dspells Henry David Spells III
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code