fireEvent
fires only one listener when multiple listener is attached to the event. For example following example should fires two listeners but only "app:test1" is shown on the console.
var win = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var btn = Ti.UI.createButton({ title: 'fireEvent' });
btn.addEventListener('click', function () {
Ti.App.fireEvent('app:test');
});
Ti.App.addEventListener('app:test', function () {
Ti.API.info('app:test 1');
});
Ti.App.addEventListener('app:test', function () {
Ti.API.info('app:test 2');
});
win.add(btn);
win.open();
https://github.com/appcelerator/titanium_mobile_windows/pull/370
Verified the fix. Event fires both listeners. Closing. Environment: Appc Studio: 4.1.1.201507141126 Ti SDK: 4.2.0.v20150724170431 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0 APPC CLI: 4.1.2 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1