{ "id": "153654", "key": "TIMOB-20104", "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": "2015-12-07T14:54:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:16.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "> *WARNING:* This is a weird edge case :(\r\n\r\nAttached you'll find an Alloy project that:\r\n\r\n* Has two *identical* libraries, the only difference is their filename\r\n* The libraries their {{module.exports}} are extended by {{Backbone.Events}}\r\n* The libraries export an init function to let them listen to {{Ti.App:resume}} and in turn trigger a {{resume}} event on themselves.\r\n* The libraries also listen to the event they trigger themselves.\r\n* The index controller requires both libraries, listens to them and calls their {{init()}} function.\r\n\r\nNow when you run the app, move it to background and then foreground again you'll see:\r\n\r\n{code}\r\n[INFO] Ti.App:resume in helper.js\r\n[INFO] helper:resume in index.js\r\n[INFO] helper:resume in helper.js\r\n[INFO] Ti.App:resume in watchSession.js\r\n[INFO] watchSession:resume in watchSession.js\r\n{code}\r\n\r\nAs you can see one is missing:\r\n\r\n{code}\r\n[INFO] watchSession:resume in index.js\r\n{code}\r\n\r\nI have no idea why. I do know that it resolves as soon as:\r\n\r\n* You rename {{watchSession.js}} to {{watchsession.js}} or anything else.\r\n* You move code from the library {{init()}} function outside of ti.\r\n* You export a property which is a clone of {{Backbone.Events}} and use that for the events.\r\n\r\nSo yes, it's simple to resolve, but I report it for two reasons:\r\n\r\n1. I can't stand it when something (doesn't) work(s) and I don't get why.\r\n2. It might be a harmless symptom of a more critical issue.", "attachment": [ { "id": "57696", "filename": "backbonify.zip", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-07T14:54:36.000+0000", "size": 5528328, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Edge case where Backbone events are not passed across modules", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.1.GA", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }