Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1728] Alloy compiler failed using TabbedBar/ButtonBar with SDK 9.0.0

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labels9.0.0, alloy, buttonbar
ReporterLorenzo Piccinini
AssigneeUnknown
Created2020-03-31T08:55:03.000+0000
Updated2020-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

FileDateSize
Bildschirmfoto 2020-12-09 um 11.39.00.png2020-12-09T13:00:45.000+000046806

Comments

  1. Ewan Harris 2020-03-31

    [~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>
       
  2. Lorenzo Piccinini 2020-03-31

    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 + ');';
       
  3. Hans Knöchel 2020-12-09

    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
  4. Rene Pot 2020-12-09

    Considering Slack is not a good archive, I've attached the screenshot, trace-log is here: https://gist.github.com/hansemannn/0e95f891725df9a7d9dc790be7fb301c

JSON Source