@nmichaud: It is normal. Some fixes come in after the first release candidate.
Looking at this, i really can’t replicate it properly. Here is the code i use, based on your description:
-- Import the widget library local widget = require( "widget" ) local list, widgetGroup widgetGroup = display.newGroup() local function drawTable() -- create a constant for the left spacing of the row content local LEFT\_PADDING = 10 -- Handle row rendering local function onRowRender( event ) local phase = event.phase local row = event.row local groupContentHeight = row.contentHeight local rowTitle = display.newText( row, "List item " .. row.index, 0, 0, native.systemFontBold, 16 ) -- in Graphics 2.0, the row.x is the center of the row, no longer the top left. rowTitle.x = LEFT\_PADDING -- we also set the anchorX of the text to 0, so the object is x-anchored at the left rowTitle.anchorX = 0 rowTitle.y = groupContentHeight \* 0.5 rowTitle:setFillColor( 0, 0, 0 ) end -- Create a tableView list = widget.newTableView { top = 38, width = 320, height = 448, onRowRender = onRowRender, } --Insert widgets/images into a group widgetGroup:insert( list ) -- insert rows into list (tableView widget) for i = 1, 30 do list:insertRow{ height = 72, } end end drawTable() local function redrawTable() -- save position local pos = list:getContentPosition() print( " got position: ", pos ) -- remove the list list:removeSelf() -- redraw it drawTable() -- scroll into it with time 0 list:scrollToY( { y = pos, time = 0, onComplete = function() print( " new position: ", list:getContentPosition() ) end } ) end -- redraw the table after 1sec timer.performWithDelay( 1000, redrawTable )
Did i capture all the data you provided correctly? Could you run this for me and see if it works properly on your project setup? Furthermore, if this works and your code does not, could you provide a minimal bug report ( main.lua + config files ) and paste its number back in here?
Thanks,
alex