Good point, Rob. However, the bug turns out to be real, after testing as you said. I discovered the remaining key part: the tableView must have less than a full screen’s worth of rows in it to trigger the bug. Happens every time if you only have a few rows. To repro:
-
Using build 1259 or other old widget demo code, add graphicsCompatibility = 1.
-
In tab1.lua, add
[lua]
print( "getContentPosition() = " … tableView:getContentPosition() )
[/lua]
in tableViewListener() to help illustrate the problem.
- In tab1.lua, change the number of rows created from 100 rows to, say, 4 rows:
[lua]
– Create 100 rows
--for i = 1, 100 do
for i = 1, 4 do
[/lua]
4. Run the widget demo using a Graphics 2.0 build like 2189 or 2214. The tableView displays.
-
Grab the table and pull DOWN. You’ll see “getContentPosition() = -200” printed in the console, then -190, etc. as you continue to pull down.
-
Let go. The tableView bounces back so the top row is where it should be.
-
Now, grab the table and swipe UP. You’ll see getContentPosition() = -200, then -210, etc. as you continue to swipe up.
-
Let go. The tableView bounces back wrongly, so the top row is now 200px down from the top of the tableView. getContentPosition() will now report the next swipe as starting at 0, not -200.
So, easy to repro. For whatever reason, if you have more than a full screen’s worth of rows, swipe up bounces back to -200. I tried changing the tableView height from 400 to 360, and as expected, the top of the tableView is now -180, but still incorrectly 0 after a swipe up.
Hope this description helps make for a quick fix. Thanks!
(side note: thaks for posting the bug number, but fogbugz never returns any search results, doesn’t show 31640 or provide any way to access it, so I couldn’t update the bug with this info)
Andy