[ALOY-1728] Alloy compiler failed using TabbedBar/ButtonBar with SDK 9.0.0
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Tooling |
| Labels | 9.0.0, alloy, buttonbar |
| Reporter | Lorenzo Piccinini |
| Assignee | Unknown |
| Created | 2020-03-31T08:55:03.000+0000 |
| Updated | 2020-12-09T13:01:10.000+0000 |
Description
The problem is incapsulation inside views. If I remove or put it out of the views all works fine.
<Alloy>
<ItemTemplate id="buttonBar" class="buttonBar" name="buttonBar">
<View id="bindBase" bindId="bindBase">
<View id="viewBase">
<ImageView id="bindIcon" bindId="bindIcon" />
</View>
<View id="viewBase2">
<Label id="bindLabel" bindId="bindLabel"></Label>
<TabbedBar platform="ios" id="bindTabbedBar" bindId="bindTabbedBar">
<Labels>
<Label title="aaa" />
<Label title ="bbb" />
</Labels>
</TabbedBar>
</View>
</View>
</ItemTemplate>
</Alloy>
Attachments
| File | Date | Size |
|---|---|---|
| Bildschirmfoto 2020-12-09 um 11.39.00.png | 2020-12-09T13:00:45.000+0000 | 46806 |
[~otto.pic] Did this work for you prior to SDK 9? I can reproduce this on 8.X SDKs also (and I wouldn't expect the SDK to matter here). It looks like this is specifically down to the ItemTemplate usage. Full code reproduction below
<Alloy> <Window id="tg" backgroundColor="white"> <ListView id="listView" defaultItemTemplate="template"> <Templates> <ItemTemplate name="template"> <View> <Label bindId="info" id="title" left="10"/> <TabbedBar platform="ios" id="bindTabbedBar" bindId="bindTabbedBar"> <Labels> <Label>One</Label> <Label>Two</Label> <Label>Three</Label> </Labels> </TabbedBar> </View> </ItemTemplate> </Templates> <ListSection headerTitle="Fruit / Frutas"> <ListItem info:text="Banana"/> </ListSection> </ListView> </Window> </Alloy>Yes I can confirm that I have the same problem with 8.3.1.GA sdk. Putting TabbedBar outside of the view of the template all works. I found this error using liveview changing template "without TabbedBar" to "with TabbedBar inside the View":
/Users/username/.appcelerator/install/7.1.2/package/node_modules/alloy/Alloy/commands/compile/parsers/default.js:98 return childTemplates + '.push(' + state.item.symbol + ');';This is a severe bug preventing some layouts, especially on Android. See my screenshot and trace-log via slack: https://ti-slack.slack.com/archives/C03CVQX2A/p1607510385086900
Considering Slack is not a good archive, I've attached the screenshot, trace-log is here: https://gist.github.com/hansemannn/0e95f891725df9a7d9dc790be7fb301c