[TIMOB-12821] iOS: Feature View event e source is not enough, consider e.owner
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | addeventlistener, event |
Reporter | Sameeh Harfoush |
Assignee | Unknown |
Created | 2013-02-04T11:21:54.000+0000 |
Updated | 2018-02-28T20:03:29.000+0000 |
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
Hello Sameeh, In 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).
Being said, can you elaborate why wouldn't be sufficient to get around this functionality? Hope hearing from you soon, thanks.
Closing due to inactivity.
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.
Thanks Sameeh, that is what I thought. Moved to main project, to dig into, review tech implications and further feasibility.
hello Eduardo, are you guys still planning to consider the "e.owner" feature?