Project: titanium
Issue TIMOB-19111: Windows: Ti.UI.Windows.CommandBar.items.push(item) does not work
While creating a polyfill for the missing Alloy XML support for CommandBar I discovered that: {code} var backButton = Ti.UI.Windows.createAppBarButton({ icon: Ti.UI.Windows.SystemIcon.BACK }), likeButton = Ti.UI.Windows.createAppBarToggleButton({ icon: Ti.UI.Windows.SystemIcon.LIKEDISLIKE }), forwardButton = Titanium.UI.Windows.createAppBarButton({ icon: Ti.UI.Windows.SystemIcon.FORWARD }), commandBar = Ti.UI.Windows.createCommandBar({ items: [backButton, likeButton] }), win = Ti.UI.createWindow(); commandBar.items.push(forwardButton); win.add(commandBar); win.open(); {code} does not work (the commandBar displays empty) while: {code:javascript} var items = commandBar.items; items.push(forwardButton); commandBar.items = items; {code} does work.
Story points: 8