Problem
The TabbedBar component is well documented at
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.TabbedBar
In the example of the documentation, the
Labels
texts are included directly in the XML template, which is not a convenient solution (at the moment) for the developer who works on a i18n application, who will probably prefer to set the
Label
's
text
properties in the associated
tss
file.
This makes alloy bug in its compilation process.
Test case
index.xml
Doing so makes alloy fail to compile (the compilation stops):
<Alloy>
<Window class="container" id="container">
<TabbedBar id="bb1" platform="ios">
<Labels>
<Label id="options1" />
<Label id="options2" />
</Labels>
</TabbedBar>
</Window>
</Alloy>
The error is:
Alloy/commands/compile/parsers/Alloy.Abstract.BarItemType.js:30
logger.warn('<BarItemType> at index ' + index + ' has no properties');
^
ReferenceError: index is not defined
at parse (Alloy/commands/compile/parsers/Alloy.Abstract.BarItemType.js:30:43)
at Object.exports.parse (Alloy/commands/compile/parsers/base.js:11:17)
...
...
After digging in the code, I guess that the same should occur with
Alloy.Abstract.CoverFlowImageType.js
Tested and confirmed when building for iOS 6 simulator with Ti SDK 3.1.1 GA and Alloy 1.1.3.
PR: https://github.com/appcelerator/alloy/pull/206 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/tabbedbar This was resolved by an earlier commit. The PR contains an update to the test app that includes the ticket description's test case. Functional testing passes if the app compiles and runs successfully for iOS.
Verified as fixed. TiSDK 3.2.0.v20131013140318 Alloy 1.3.0 iOS 7 (Xcode 5) Closing.