Yes, I do, I ussually wrap them up in another function:
My objects have a listeners list then when I want to propagate an event I do as following:
[lua]
for i, v in pairs(self._listeners) do
event._params = self._params – my own params injected in the event.
v.listener[v.fun](v.listener, event) – my call to the listener.
end
[/lua]
method 1:
For enter frame, I define an “object:enterFrame(event)” method, this one you should call it exactly like this or use method 2
Runtime:addEventListener( “enterFrame”, self )
method 2
local function callback(event)
object:callMyRealFunction(event)
end
Runtime:addEventListener( callback )
and for timers same thing:
timer.performWithDelay(700, function()
object:function(parameters)
end
as you see you can wrap them up easily (of course this code applied with care and to your own structure).
I hope this helps to everyone.