[SOLVED] How to stop touch events from going through?

Hello everybody,

I’m on Corona Build 704 (Mac) and am using storyboard with tableviews. I have a list of items, when you touch them it takes you to another scene. Here’s my problem, the touch event goes through and continues to the new scene resulting in buttons getting touched unwillingly in the new scene. I have “return true” in the end of my onRowTouch() function but that doesn’t help.
Any ideas?

Thanks for reading!
Kristian [import]uid: 113596 topic_id: 27202 reply_id: 327202[/import]

Hi.

Can you post up some code (Although this may be an issue that has already been fixed) [import]uid: 84637 topic_id: 27202 reply_id: 110498[/import]

Hi Danny!

Thanks for replying, and I know it took a while… :wink:

I am now on the new public release and I’m still experiencing the same problem. But I think I have figured out what the problem/bug is.

  
 local function onRowTouch( event )  
  
 -- CHANGE STORYBOARD SCENE  
  
 local options =   
 {  
 params = {itemNumber = event.index}   
 }  
 storyboard.gotoScene( "item", options )  
 return true  
  
 end  
  

This changes the scene without executing the code below storyboard.gotoScene (here it’s the “return true”). So I need to add an separate touch event listener to an object below my tableview which acts as my onRowTouch function. Like this:

  
local function onRowTouch( event )  
  
 -- SET ITEMNUMBER  
  
 options =   
 {  
 params = {itemNumber = event.index}   
 }  
  
end  
-- AND THEN THE OTHER LISTENER FUNCTION  
  
local function returnTrue()  
 print("RETURNING TRUE")  
 if options then  
  
 storyboard.gotoScene("item", options)  
  
 end  
  
 return true  
end  

I don’t know why this 2nd approach works while the first one does not. I am looking forward to hearing from you guys.
Thanks! [import]uid: 113596 topic_id: 27202 reply_id: 112932[/import]

Hi, I’m not sure what you’re trying to do here but I think you’re attempting the same thing I was with tab switching. I would think the issue is actually related to deactivating the original tableView. Unfortunately my solution was to leave the tableView on screen and simply hide it. Have you tried setting your tableView.isVisible=false before switching scene? [import]uid: 8271 topic_id: 27202 reply_id: 112956[/import]

I am also trying to solve this issue. I only have this problem with the TableView widget. I am also returning true at the end, but with no success. [import]uid: 8945 topic_id: 27202 reply_id: 114706[/import]

Thanks for trying to help, the problem was that I had not inserted the tableview to the scene.view group! [import]uid: 113596 topic_id: 27202 reply_id: 116587[/import]