Crikey, I have a slightly odd event listener set up and I’m trying to work out why the ‘event’ argument is not being passed into the handler function. Could someone take a look at my simplified sample, please?
[lua]function createPanel()
local panel = display.newGroup()
function panel:doAction( event )
– event here is nil!
end
function panel:createButton( parent, img, x, y, handler )
local button = display.newImage( parent, img )
img.x, img.y = x, y
button:addEventListener( “touch”, handler )
return button
end
panel.homeButton = panel:createButton( panel, “homebutton.png”, 100, 100, panel.doAction )
return panel
end[/lua] [import]uid: 8271 topic_id: 4499 reply_id: 304499[/import]