i am trying this code to dispatch events
================================================
local temp = display.newGroup()
local something = function(event)
print(“here !!”)
end
temp:addEventListener(“aaa”,something)
local event = {name=“aaa”,target = temp}
timer.performWithDelay (1000, function () temp:dispatchEvent(event) end)
when I run the code I get this error:
Runtime error
?:0: attempt to index a nil value
stack traceback:
[C]: ?
?: in function ‘?’
?: in function <?:214>
What is going on?
Regards
elvan
[import]uid: 12167 topic_id: 8500 reply_id: 308500[/import]