Hi everybody,
I started with corona last week and I have some questions… anyone can help me, please?
The first one is about arguments passed to a function called by the onEvent from a button.
I want to pass two arguments to a function called by a button, but this not working out.
Here’s my code:
local function handleButtonEditarEvent( carta )
if ( “ended” == event.phase ) then
…
end
end
local function handleButtonAEvent( event ) if ( “ended” == event.phase ) then carta = “A” button_editar = widget.newButton { x = display.contentCenterX , y = 820, id = “button_editar”, onRelease = handleButtonEditarEvent(carta), overFile = “”, defaultFile = “image/editar.png” }
…
end end
I need to pass this variable “carta” to the function “handleButtonEditarEvent”. How can I do this?
Thank you very much.