Hello I am trying to pass focus back to the tableView by using tableView:takeFocus() (same method as scrollView) and it is not working… Does anyone know a workaround or have a solution? Your help will be greatly appreciated!
do any dev’s have any input on this?
Hi, The sample that I sent you for tableviewext has a takeFocus method. You can also do something like this tableview._view:touch(event)
Atanas, i looked at it and it did not quite work the way i wanted it to… However I messed with what you gave me and now have the perfect working solution by combining them! Now allows you to continue dragging the view even if the object with a touch event was touched first. Thanks a bunch!
-- supports object touch events inside tableView ------------------------------------------------ local function touchListener(e) if (e.phase=="began" or e.phase=="moved") then display.getCurrentStage():setFocus(tableView.\_view:touch(e)) elseif (e.phase=="ended") then print("Object inside tableView clicked!") end return true end
do any dev’s have any input on this?
Hi, The sample that I sent you for tableviewext has a takeFocus method. You can also do something like this tableview._view:touch(event)
Atanas, i looked at it and it did not quite work the way i wanted it to… However I messed with what you gave me and now have the perfect working solution by combining them! Now allows you to continue dragging the view even if the object with a touch event was touched first. Thanks a bunch!
-- supports object touch events inside tableView ------------------------------------------------ local function touchListener(e) if (e.phase=="began" or e.phase=="moved") then display.getCurrentStage():setFocus(tableView.\_view:touch(e)) elseif (e.phase=="ended") then print("Object inside tableView clicked!") end return true end
Hi @eja,
Thanks for addressing this problem. I’ve run into similar issues. However, when I tried implementing the code you posted, I was given a stack overflow error. Any idea why this might be?
Hi @eja,
Thanks for addressing this problem. I’ve run into similar issues. However, when I tried implementing the code you posted, I was given a stack overflow error. Any idea why this might be?