Hi everyone - I am just starting out with Corona development and playing around. I am trying to pass a string to a function but can’t seem to get it working. I have looked around Google and can’t seem to find examples of what i am trying to do. I am using the newTableView widget.
I am trying to pass a string the onRowRender function so I can control the text on each row. Sounds simple enough? Here is my code. Any ideas?
Cheers, Gary
[code]
local function onRowRender( event, strText )
local row = event.target
local rowGroup = event.view
local id = row.index
local text = display.newRetinaText(strText, 12, 0, “Helvetica-Bold”, 18 )
text:setReferencePoint( display.CenterLeftReferencePoint )
text.y = row.height * 0.5
text.x = 15
text:setTextColor( 0 )
rowGroup:insert( text )
end
local rowHeight, rowColor, lineColor, isCategory
list:insertRow{
onEvent=onRowTouch,
onRender=onRowRender(“Hello world”),
height=rowHeight,
isCategory=isCategory,
rowColor=rowColor,
lineColor=lineColor
}
[/code] [import]uid: 120697 topic_id: 30288 reply_id: 330288[/import]