Problem
TabbedBar does not consistently fire click event.
Reproducible Steps
1. Execute the sample code
2. Click on the TabbedBar buttons 4-5 times (after the 2nd time the event won't be fired anymore)
Sample Code
var win = {};
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var rootWin = Titanium.UI.createWindow({
});
win.main = Titanium.UI.createWindow({
});
win.rootNav = Titanium.UI.iPhone.createNavigationGroup({
window: win.main
});
rootWin.add(win.rootNav);
rootWin.open();
function showWin(){
var newWin = Titanium.UI.createWindow({
});
var tb2 = Titanium.UI.createTabbedBar({
labels:[
{title: 'A', width: 100, enabled:true},
{title: 'B', width: 100, enabled:true},
{title: 'C', width: 100, enabled:true}
],
});
tb2.addEventListener('click', function(e){
alert('I work!');
});
newWin.setToolbar([tb2]);
win.rootNav.open(newWin);
}
showWin();
Associated HelpDesk Ticket
http://appc.me/c/APP-318632
pull pending #764
Tested on Ti Studio 1.0.7.201112080131 Ti Mob SDK 1.8.0.1.v20111207180431 OSX Lion iPhone 4S OS 5.0.1 Expected behavior of segment control firing click events is shown
Reopened to edit labels