{ "id": "137633", "key": "TIMOB-19450", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-10-03T14:54:01.000+0000", "priority": null, "labels": [ "TCSupportTriage", "core", "defect" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:08.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The project consists of a single Alloy controller which creates a WebView which in turn loads index.html. The project was too big to include so please download from...\r\n\r\nhttps://dl.dropboxusercontent.com/u/5641333/EventingError.7z\r\n\r\nThere are 2 distinct sides to the app namely the local js file which is loaded by index.html and the Alloy controller, index.js. For ease I will refer to these as web-side and app-side.\r\n\r\nOn the web-side I've created a process which creates 10 eventListeners and then fires an event which is picked up on the app-side. The app-side responds by firing the previously added events. On the web-side the eventListeners respond to the events by sequentially logging one to ten to the console. Finally when the last event (ten) is fired the eventListeners are removed. So in simple terms we create the listeners, fire the associated events and then remove the listeners.\r\n\r\nWhen first running the sequence one to ten is printed to the console as expected however, subsequent runs call the events out of order suggesting the event handler is somehow assigned to the wrong event when it has previously removed.\r\n\r\nTo reproduce please run the attached project, click run and see one to ten printed to the console. When the events have been removed (logged in the console) click run again, you'll see events one to ten fire in the correct order on the app-side but on the web-side they do not, worse still all the event handlers do not fire.", "attachment": [], "flagged": false, "summary": "Event handlers are assigned to the wrong event when removing and re-adding", "creator": { "name": "AdrianHolmes", "key": "adrianholmes", "displayName": "Adrian Holmes", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "AdrianHolmes", "key": "adrianholmes", "displayName": "Adrian Holmes", "active": true, "timeZone": "Europe/London" }, "environment": "Windows 8.1, Titanium Command-Line Interface, CLI version 3.4.0, Titanium SDK version 3.4.0.GA, Alloy 1.5.1, Samsung Galaxy S3 - 4.2.2 - API 17 ", "comment": { "comments": [ { "id": "330995", "author": { "name": "AdrianHolmes", "key": "adrianholmes", "displayName": "Adrian Holmes", "active": true, "timeZone": "Europe/London" }, "body": "Hi Guys,\r\n\r\nDo you have any feedback on this? I ask because we're 2 to 3 weeks away from launching the app and I was wondering if you'd have a solution or if we should look to find an alternative approach.\r\n\r\nThanks", "updateAuthor": { "name": "AdrianHolmes", "key": "adrianholmes", "displayName": "Adrian Holmes", "active": true, "timeZone": "Europe/London" }, "created": "2014-11-06T10:32:17.000+0000", "updated": "2014-11-06T10:32:17.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }