Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19213] Windows: fireEvent fires only one listener

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-07-15T22:17:11.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 5.0.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2015-07-14T01:27:14.000+0000
Updated2015-08-04T16:07:16.000+0000

Description

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();

Comments

  1. Kota Iguchi 2015-07-14

    https://github.com/appcelerator/titanium_mobile_windows/pull/370
  2. Lokesh Choudhary 2015-07-27

    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

JSON Source