I have a function in my code that I’d like to re-fire based on user input. What I’ve got now looks something like this:
[lua]local myFunction = function(event)
local listenerFunction = function(event)
if event.index == 1 then
--do nothing
else
--call to “myFunction” goes here
print(“You’ve reached this point!”)
end
--some action here
native.showAlert(“myApp”, “Would you like to retry this action?”, {“No”, “Yes”}, listenerFunction)
end[/lua]
However, I’ve tried this approach and it does not work. I know that the listenerFunction is being called, and I know that I reach the “You’ve reached this point!” print statement, but myFunction is not being called a second time. Any suggestions?