Passing variables to event functions

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]

onRowRender occurs when the row needs to be redrawn.
You dont get to call that yourself.
onRender=onRowRender() just tells the system which code to run in response.
The event parameter tells you about the row that is being drawn.
If you have an array of strings which has as many items as you have list rows, you can ask the event object what row is being drawn, and get the text from the matching item in the array.

So instead of
display.newRetinaText(strText,

you would use
display.newRetinaText(myArray[event.index], [import]uid: 108660 topic_id: 30288 reply_id: 121338[/import]

onRowRender occurs when the row needs to be redrawn.
You dont get to call that yourself.
onRender=onRowRender() just tells the system which code to run in response.
The event parameter tells you about the row that is being drawn.
If you have an array of strings which has as many items as you have list rows, you can ask the event object what row is being drawn, and get the text from the matching item in the array.

So instead of
display.newRetinaText(strText,

you would use
display.newRetinaText(myArray[event.index], [import]uid: 108660 topic_id: 30288 reply_id: 121338[/import]