I don’t understand why the params{} data arrive void at onRowRender.
... function scene:create( event ) btnGroup = display.newGroup() tbV = widget.newTableView( { left = 10, top = 300, height = 180, width = 300, onRowRender = onRowRender, noLines = false, hideScrollBar = false, rowHeight =8 } ) btnGroup:insert(tbV) ... local function txtLog( myTxt ) local options = {} options.isCategory = false options.rowHeight = 10 options.rowColor = { default={0.8,0.8,0.8,0.8} } options.lineColor = { 1, 0, 0 } options.params = {message = myTxt} tbV:insertRow{options} end ... local function onRowRender( event ) -- Get reference to the row group local row = event.row local id =row.index local params = event.row.params row.bg = display.newRect( 0, 0, display.contentWidth, 60 ) row.bg.anchorX = 0 row.bg.anchorY = 0 row.bg:setFillColor( 1, 1, 1 ) row:insert( row.bg ) if (event.row.params) then row.nameText = display.newText( params.msg, 6, 0, native.systemFont, 6 ) row.nameText.anchorX = 0 row.nameText.anchorY = 0.5 row.nameText:setFillColor( 0 ) row.nameText.y = 10 row.nameText.x = 0 row:insert( row.nameText ) end return true end
looking with debug:
local params = event.row.params
event.row.params is alway = nil
What I’m making wrong ?
Thanks
Renato