Parameter passing to scene from listview

I know you can pass param to scenes but can you send the selected row fomr a list view to a scene? Something like this

local function SendParam( event )
    local row = event.row
    print("Row " …row.index)
    local options =
    {
    effect = “fade”,
    time = 400,
    params =
    {
    billname = evacRecs[row.index].bname,
    bill_id = evacRecs[row.index].id,
    }
    }

        storyboard.gotoScene( “view1”, options )
       
end

Of course it doesn’t work because it doesn’t like row. With error “Attempts to index local ‘row’ (a nil value’)”

I am trying to send it from main.lua to a scene, is it possible? I am using a table listerner, is that the problem?

Which line of the code is the error happening on? The line in the code above where you try to reference ‘row.index’ or in the scene code, where ‘row’ may not exist?

on the print line

I think, rather than defining a new function for this job you could try to put the same code into onRowTouch listener for your listView and then it should work.

I will give that a try ksan, thank you

Actually, I wanted it to come from a tabbar, so I see my problem, its when I click on the listview item and it moves the screen to show me what was selected, its there I want to send that info to a scene. How do I send that info to a scene from a selected item from a listview? I can see how row wouldn’t be populated now. Is that still considered the onRowTouch event?

I really wanted to control the tap event on th elistview, once tap jus thighlight and two taps to shwo what was selected on another screen. But all I get is tap and pressed. I did have it counting taps with numTaps but the row paramter is missing when that happens.

Which line of the code is the error happening on? The line in the code above where you try to reference ‘row.index’ or in the scene code, where ‘row’ may not exist?

on the print line

I think, rather than defining a new function for this job you could try to put the same code into onRowTouch listener for your listView and then it should work.

I will give that a try ksan, thank you

Actually, I wanted it to come from a tabbar, so I see my problem, its when I click on the listview item and it moves the screen to show me what was selected, its there I want to send that info to a scene. How do I send that info to a scene from a selected item from a listview? I can see how row wouldn’t be populated now. Is that still considered the onRowTouch event?

I really wanted to control the tap event on th elistview, once tap jus thighlight and two taps to shwo what was selected on another screen. But all I get is tap and pressed. I did have it counting taps with numTaps but the row paramter is missing when that happens.