[TIMOB-14688] BlackBerry: Window events not firing
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | High | 
| Status | Closed | 
| Resolution | Fixed | 
| Resolution Date | 2013-09-26T22:47:19.000+0000 | 
| Affected Version/s | Release 3.1.1 | 
| Fix Version/s | 2013 Sprint 20, 2013 Sprint 20 API, Release 3.2.0 | 
| Components | BlackBerry | 
| Labels | blackberry, parity, qe-testadded, window | 
| Reporter | Martin Williamson | 
| Assignee | Pedro Enrique | 
| Created | 2013-07-29T14:04:34.000+0000 | 
| Updated | 2014-02-19T21:17:01.000+0000 | 
Description
	*Problem*
Events attached to a window (in a tab group) do not fire, have tried directly on the window and in the tabGroup (where I actually want it) works fine in iOS and Android.
*Note*
I also tried 'load' which also does not fire.
*Test case*
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});
var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});
win1.add(label1);
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});
var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});
win2.add(label2);
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);
tabGroup.addEventListener('focus', function(e) {
	alert('tab changed');
});
tabGroup.open();
PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/178
Tested Environment: Appcelerator Studio: 3.2.0.201311120707 SDK:3.2.0.v20131111174605 alloy: 1.3.0 acs: 1.0.7 npm: 1.3.2 titanium: 3.2.0 titanium-code-processor: 1.0.3 Xcode:5.0.1 Device: Blackeberry Z 10 OS: Mac OSX 10.9 Used above code to test. Working as expected. Getting alerts on tab change. Hence closing the issue.