Looking over the sample code for the Widget TableView functionality, I feel like I am missing something. The section that gives an example of adding multiple rows from one render function doesn’t place the next on the different rows, it looks to just stack it up on top of each other. Is there something I am missing?
[code]local widget = require “widget”
_w = display.contentWidth
_h = display.contentHeight
– create the tableView widget
local list = widget.newTableView{
width = _w,
height = _h
}
– create 25 rows using a single onRender listener
for i=1,25 do
local function onRowRender( event )
local group = event.view
local row = event.target
local index = event.index
local id = event.id
local text = display.newText( “Row #” … index … ", id: ", 0, 0, native.systemFont, 14 )
text:setTextColor( 0 )
text:setReferencePoint( display.CenterReferencePoint )
text.x = row.width * 0.50
text.y = row.height * 0.50
end
– insert row into the TableView widget
list:insertRow{
id = “unique-row-” … i,
onRender = onRowRender
}
end[/code]
Any help would be appreciated greatly. [import]uid: 157382 topic_id: 30568 reply_id: 330568[/import]