problem
In the following test case, the TabbedBar will not show in the data bound TableViewRows. It does however show up when data binding is removed. Upon inspection of the generated code, it appears that the Labels array is not being generated.
var __alloyId10 = [];
var __alloyId17 = Ti.UI.iOS.createTabbedBar({
labels: __alloyId10,
left: "50",
top: "10"
});
test case
app/alloy.js
var feed = Alloy.Collections.feed = new Backbone.Collection();
feed.reset([
{first:'first',second:'second',third:'third',fourth:'fourth'},
{first:'first',second:'second',third:'third',fourth:'fourth'},
{first:'first',second:'second',third:'third',fourth:'fourth'},
{first:'first',second:'second',third:'third',fourth:'fourth'},
{first:'first',second:'second',third:'third',fourth:'fourth'}
]);
index.xml
<Alloy>
<Window layout="horizontal">
<View class="container">
<TableView dataCollection="feed" top="10" separatorColor="#ffffff" height="600">
<TableViewRow height="200">
<Label text="first" align="left" left="10"/>
<TabbedBar left="50" top="10">
<Labels>
<Label>TAB1</Label>
<Label>TAB2</Label>
<Label>TAB3</Label>
</Labels>
</TabbedBar>
</TableViewRow>
<TableViewRow>
<Label text="second"/>
</TableViewRow>
<TableViewRow>
<Label text="third"/>
</TableViewRow>
<TableViewRow>
<Label text="fourth"/>
</TableViewRow>
</TableView>
</View>
</Window>
</Alloy>
index.js
$.index.open();
Alloy.Collections.feed.trigger('change');
PR: https://github.com/appcelerator/alloy/pull/207 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-713 functional testing can pass by doing the following:
run the app on ios
confirm that it loads without error
confirm that the tabbedbars appear in each "first row"
confirm that the buttons in each tabbedbar reflect the static and bound values that are expected. In this case, they should be "tab 1", "fourth", and "tab 3" respectively.
Verified fixed. Alloy 1.3.0 CLI 3.2.0 TiSDK 3.2.0.v20131010163242 Titanium Studio 3.1.4 Closing