{ "id": "109086", "key": "TIMOB-12821", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2013-02-04T11:21:54.000+0000", "priority": null, "labels": [ "addeventlistener", "event" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:29.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If i have two views one inside the other and you put a click EventListener on the topmost parent view, the e.source will reference the child view if it fires and bubbles to the parent click event. there must be a property that reference the object that the EventListener was called upon, something like e.owner. e.owner will reference the view that has an addEventListener", "attachment": [], "flagged": false, "summary": "iOS: Feature View event e source is not enough, consider e.owner", "creator": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "environment": null, "comment": { "comments": [ { "id": "238842", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello Sameeh,\n\nIn order to get a better understanding about this Feature request, I come up with a simple sample. Just added a simple property such as an ID value (parent view) which is generally OK. Typically is widely implemented to set IDs on your objects and check the id in the click event to determine which object was clicked (if you have more than one).\n\n{code}\nvar win = Ti.UI.createWindow({\n orientationModes: [ Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT ],\n layout: \"absolute\"\n});\n \nvar iAdView = Ti.UI.createView({\n bottom: \"0px\",\n height: \"500\",\n width: \"500\",\n backgroundColor: \"gray\"\n});\nvar childView = Ti.UI.createView({\n\theight: '25',\n\twidth: Ti.UI.FILL,\n\tbackgroundColor: 'red',\n\towner: iAdView\n});\niAdView.add(childView);\n\niAdView.addEventListener(\"click\", function (e) {\n if(null != e.source.owner){\n \talert( JSON.stringify(e) );\n \tTi.API.info(\" e.source: \"+ e.source.owner ); \t\n }\n});\n \nwin.add(iAdView);\nwin.open();\n{code}\n\nBeing said, can you elaborate why wouldn't be sufficient to get around this functionality? Hope hearing from you soon, thanks. ", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-18T19:13:33.000+0000", "updated": "2013-02-18T19:13:33.000+0000" }, { "id": "239247", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-21T16:27:39.000+0000", "updated": "2013-02-21T16:27:39.000+0000" }, { "id": "239361", "author": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "body": "the above example is exactly the same workaround i used in the beginning and it works. but if you have complex parent/child UI, the above approach gets annoying and you end up keeping track of many parent/ child variable reference. thanks anyway.", "updateAuthor": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "created": "2013-02-22T05:44:28.000+0000", "updated": "2013-02-22T05:44:28.000+0000" }, { "id": "239403", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks Sameeh, that is what I thought. \n\nMoved to main project, to dig into, review tech implications and further feasibility.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-22T17:01:42.000+0000", "updated": "2013-02-22T17:01:42.000+0000" }, { "id": "271231", "author": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "body": "hello Eduardo, are you guys still planning to consider the \"e.owner\" feature?", "updateAuthor": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "created": "2013-09-16T11:01:04.000+0000", "updated": "2013-09-16T11:01:04.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }