I do not know it is a bug or feature but following code causes infinite loop, do you have any workaround for this issue?
[lua]local test = display.newImage(“box.PNG”)
local tapCount = 0
function tapped(event)
tapCount = tapCount + 1
print(“Tapped " … tapCount … " times.”)
event.target:removeEventListener(“tap”, tapped)
event.target:addEventListener(“tap”, tapped)
end
function createScreen()
test:addEventListener(“tap”, tapped)
end
function main()
createScreen()
end
main()[/lua]
[import]uid: 208004 topic_id: 34414 reply_id: 334414[/import]