By the way, the reason I try to do event delegation is because:
You know when passing an object onto addEventListener , functions on the object with name matching the event name will be used.
I find myself doing this when binding tap listeners:
function Class:tap (event) if event.target.id == 'button1' then self:\_actual\_handler\_for\_button1() elseif event.target.id == 'button2' then self:\_actual\_handler\_for\_button2() end end
But I could refactor my code to have a Class for each button, so we bind the listener there instead of at the button group class.
Either way, I am just wondering about the Corona SDK best practice here.
(In JavaScript there are often many ways to achieve the same thing, all of them flawed in one way or another, you could say I am spoiled by its flexibility…)