Sounds like a bug in the tableView library. Can I get you to create a bug report for this please? To do so, create a sample project that demonstrates the issue. It must be a complete project (main.lua, build.settings, config.lua and any other assets needed to build and run the project). Now put that entire project folder into a .zip file. Use the Report a bug feature at the top of the page. After you submit it, you will get an email with a caseID# in the subject of the email. Please post that number back here as a reference.
The program submitted possibly could be shorter, but I’m new to Corona, so I made this program from the sample Interface/WidgetDemo. And I did not deleted some lines that are questionable to me. Since when I tried to remove a line
This is a completely reproducible problem I’ve been struggling with for some time too. Having spent many hours wrestling with it, I can offer the following advice:
If you can, use the tap event rather than a press/release event. It ONLY happens when your action is defined in the press/release events.
use a timer.performWithDelay on any tableview:reloadData()
I’ve all but eradicated the problem doing the above. But yes, the problem seems to mostly occur on pressing on a row background and then releasing on the scrollview background underneath. As I say, a tap event, if you can get away with it (because obviously it’s limiting compared to the alternatives) eliminates that possibility.
Mind you, I’ve since embarked on a rewrite of the widget2 libraries because frankly they break at the drop of a hat.
If you feel so inclined, another thing I’ve found is worth taking the time to do to avoid a whole raft of potential problems is to tweak scrollviews (and tableviews to a lesser event because they’re written slightly more robustly with at least some basic prevention against self destructing) to not use a transition at all when called with a time of 0 (yes, they call pointless transitions by default whether they need to or not!)
I’ve also taken to manually calling transition cancels (on everything!) whenever I have to delete anything from a scrollview or tableview, because that’s another sure fire way to break stuff.
You shouldn’t have to, of course. But it’s better than the embarrassment of hundreds of reports of run time errors in your business application.
Problem is that I dunno how to detect on what element or part of a table row user clicked. I have a lot of text and color rectangles on each row element, but I can’t add any buttons to row element. And I did not found how to check/read actual X, Y for tap event.
As a workaround I used tap for default action and longer click and hold for select.
About advice. Do I have to do both 1) and 2) or just one of those is enough? Because calling redraw with small delay instead of direct call is not a problem.
i found both to be necessary. It’s actually using tap rather than press/release that made it far more robust. It eliminates any possibility of tableview getting confused about what element it’s supposed to be setting a fill on. Unfortunately, that makes it a little less responsive, because only a particular behaviour is seen as a tap… and it’s people that DON’T tap (but rather linger AND aren’t very good at lifting off in the same place they pressed) that are causing the issue!
Could you please post an example of your fixed code? I tried to implement the delay but it didn’t seem to fix it. (But I know there are a few ways to skin that cat…)
Sounds like a bug in the tableView library. Can I get you to create a bug report for this please? To do so, create a sample project that demonstrates the issue. It must be a complete project (main.lua, build.settings, config.lua and any other assets needed to build and run the project). Now put that entire project folder into a .zip file. Use the Report a bug feature at the top of the page. After you submit it, you will get an email with a caseID# in the subject of the email. Please post that number back here as a reference.
The program submitted possibly could be shorter, but I’m new to Corona, so I made this program from the sample Interface/WidgetDemo. And I did not deleted some lines that are questionable to me. Since when I tried to remove a line
This is a completely reproducible problem I’ve been struggling with for some time too. Having spent many hours wrestling with it, I can offer the following advice:
If you can, use the tap event rather than a press/release event. It ONLY happens when your action is defined in the press/release events.
use a timer.performWithDelay on any tableview:reloadData()
I’ve all but eradicated the problem doing the above. But yes, the problem seems to mostly occur on pressing on a row background and then releasing on the scrollview background underneath. As I say, a tap event, if you can get away with it (because obviously it’s limiting compared to the alternatives) eliminates that possibility.
Mind you, I’ve since embarked on a rewrite of the widget2 libraries because frankly they break at the drop of a hat.
If you feel so inclined, another thing I’ve found is worth taking the time to do to avoid a whole raft of potential problems is to tweak scrollviews (and tableviews to a lesser event because they’re written slightly more robustly with at least some basic prevention against self destructing) to not use a transition at all when called with a time of 0 (yes, they call pointless transitions by default whether they need to or not!)
I’ve also taken to manually calling transition cancels (on everything!) whenever I have to delete anything from a scrollview or tableview, because that’s another sure fire way to break stuff.
You shouldn’t have to, of course. But it’s better than the embarrassment of hundreds of reports of run time errors in your business application.
Problem is that I dunno how to detect on what element or part of a table row user clicked. I have a lot of text and color rectangles on each row element, but I can’t add any buttons to row element. And I did not found how to check/read actual X, Y for tap event.
As a workaround I used tap for default action and longer click and hold for select.
About advice. Do I have to do both 1) and 2) or just one of those is enough? Because calling redraw with small delay instead of direct call is not a problem.