Hi guys,
I made an android keypad module because a keyboard with numbers and a decimal point is not available atm in Corona SDK. I’d be happy to share the module with you guys but there is one more essential thing that has to be done. Return the value of the button that is tapped each time it is tapped. So in my module file, this function is assigned to the “onEvent” value in my button:
function onEvent(event) if event.phase == "ended" then returnValue = event.target.id end end
returnValue is a var with the an empty string “” assigned to it earlier.
So my first idea was to make a second function that looks like this:
function t.getInput() if returnValue == "" then else return returnValue end end
Now, I could call this function in my main file and get a value once, but how could I make it so that the function will be triggered in my main file every time a button is pressed?
Kind regards
Bram