touch and physics bodies

Hi,
I am trying to have three physics bodies and remove them when touched. Now the issue is that I cannot have the event.target correctly recognize the object touched.

local onTouch = function (event)  
 if "ended" == event.phase then  
 event.target:removeSelf() ----Fails, as event.target is nil  
 end  
end  
  
Runtime:addEventListener("touch",onTouch)  

but if instead, I use

object:addEventListener("touch",onTouch)  

it works. I can continue to work with this workaround, but would like to understand why is it that the Runtime event does not recognize the target object?

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3476 reply_id: 303476[/import]

Runtime doesn’t include a target in the event, it’s just generic. I have requested this feature to be implemented though
http://developer.anscamobile.com/forum/2010/11/07/eventcurrenttarget-runtimeaddeventlistener-and-groupaddeventlistener [import]uid: 6645 topic_id: 3476 reply_id: 10453[/import]