I have this code in a touch listener:
t.pathdots[#t.pathdots+1]=display.newCircle(0,0,4) t.pathdots[#t.pathdots].x=event.x t.pathdots[#t.pathdots].y=event.y sceneGroup:insert(t.pathdots[#t.pathdots])
this is creating some circles along a path and everything is working fine BUT
after reloading this scene (composer) I get the following error:
… : attempt to call method ‘insert’ (a nil value) (for the line sceneGroup:insert(t.pathdots[#t.pathdots]) )
Any ideas what can cause this? the sceneGroup is created in each composer function like this:
local sceneGroup = self.view