I am having a number issues with the latest public release (2013.1076). When switching my code to follow some of the new forms I have ran into a few strange problems. I have found workarounds for almost all of them, but I will still bring them up here just to see if there is something obvious I am missing.
- My tab bar widgets are forcing me to manually include a theme in my code. The way I understood it this should be automatic, correct?
- The value is not updating on my sliders anymore with the new widget 2.0 library. I have had to manually set them each time the listener is called using “slider:setValue(event.value)”
- My runtime listener for my game loop would not be removed properly in exitScene function. I had to move it into the loop itself when a game over happens. Its works fine now, but still a strange side affect from the update.
- One of my touch listeners is running twice per touch since I updated to the latest public build (both in the simulator and on my device). I have not found any work around for this. This is the problem I need help with. More details are below.
This is my listener (I have cut some inner code that isn’t related to the problem to simplify)
local function touchListener(event) if(not pauseInstance.paused) then print(event.phase) if (event.phase == "began") then print( "Touched!" ) end end return true; end
I add and remove the listener on enter and exit like I am supposed to.
background:addEventListener( “touch”, touchListener );
background:removeEventListener( “touch”, touchListener );
Now the output from this I get per touch:
began
Touched!
began
Touched!
ended
ended
A touch is two nested touches for some reason… Does anyone have any ideas what the issue is?
Thanks in advance.