how to go to new scene on rowListner in tableview>

I have tried everything i can think of or read. i can put if phase == “press” then storyboard gotoscene , but how would i define each row? i have tried if phase = press and row == 1 i have tried several combinations PLEASE HELP!!    here is my code 

display.setStatusBar( display.HiddenStatusBar )

– Start up Storyboard

local storyboard = require( “storyboard” )

local scene = storyboard.newScene()

local widget = require(“widget-v1”)

local page = audio.loadSound (“page.mp3”)

require “sqlite3”

local top = display.statusBarHeight -25

local listRecs = {}

local list = nil

local db

local detailGrp

   local bGo = function (event )

       if event.phase == “release” then

          storyboard.gotoScene( “religion”, “fade”, 500 )

          audio.play(page)

       end

end

local bGo1 = function (event )

       if event.phase == “release” then

          storyboard.gotoScene( “doctrine”, “fade”, 500 )

            audio.play(page)

       end

end

local bGo2 = function (event )

       if event.phase == “release” then

          storyboard.gotoScene( “topic”, “fade”, 500 )

            audio.play(page)

       end

end

local bGo3 = function (event )

       if event.phase == “release” then

          storyboard.gotoScene( “menu”, “fade”, 500 )

            audio.play(page)

       end

end

local bGo4 = function (event )

       if event.phase == “release” then

          storyboard.gotoScene( “settings”, “fade”, 500 )

            audio.play(page)

       end

end 

local function linePrinter(t, xStart, yStart, grp)

    local lineSpacing = 18

    local xLoc = xStart

    local yLoc = yStart

    local idx = 1

    local fontSize = 14

    local fontFace = “Helvetica”

    local lineColor

    

    for i = 1, #t do

        if t[i][1] ~= nil and t[i][1] ~= “” then

            

            fontSize = t[i][“size”] or 14

            fontFace = t[i][“font”] or “Helvetica”

            lineColor = t[i][“color”] or {0,0,0}

            

            local txt = display.newText( t[i][1], xLoc, yLoc + (idx * lineSpacing), fontFace, fontSize )

            txt:setTextColor ( lineColor[1], lineColor[2], lineColor[3] )

            lineSpacing = fontSize + 4

            

            if t[i][“align”] ~= nil then

                if t[i][“align”] == “center” then

                    txt:setReferencePoint (display.CenterReferencePoint)

                    txt.x = display.contentWidth / 2

                elseif t[i][“align”] == “center” then

                    txt:setReferencePoint (display.CenterRightReferencePoint)

                    txt.x = display.contentWidth - xLoc    

                end

            end

            

            if grp then

                grp:insert(txt)

                

            end

            idx = idx + 1

        end

    end

end

local function setUpDatabase(dbName)

    

    local path = system.pathForFile( dbName, system.DocumentsDirectory )

    

    local file = io.open( path, “r” )

    

    if ( file == nil ) then

        – copy the database file if doesn’t exist

        local pathSource     = system.pathForFile( dbName, system.ResourceDirectory )

        local fileSource     = io.open( pathSource, “r” )

        local contentsSource = fileSource:read( “*a” )

                

        local pathDest = system.pathForFile( dbName, system.DocumentsDirectory )

        local fileDest = io.open( pathDest, “w” )

        fileDest:write( contentsSource )

            

        io.close( fileSource )

        io.close( fileDest )

    end

    local gameDB = system.pathForFile(dbName, system.DocumentsDirectory)

    local dbNew = sqlite3.open( gameDB )

    return dbNew

end

    

local function setupInterface()

     bg = display.newRect( 0, top, display.contentWidth, display.contentHeight - top)

     bg:setReferencePoint( display.BottomRightReferencePoint )

    bg:setFillColor(255, 255, 255)

    bg.x=display.contentWidth+50

    

    

    

    

    list = widget.newTableView {

        

        top = top + 10,

        height = 304,

        width = display.contentWidth+80,

        maskFile = “mask.png”,

        onRowTouch = onRowTouch,

    }

    

     end

local function loadData()

    local sql = “select * from projects”

    

    for a in db:nrows(sql) do

        listRecs[#listRecs+1] =

        {

        id = a.id,

        name = a.name,

        category = a.category,

        rating = a.rating

        }

    end

end

local function showDetails(idx)

    display.remove(detailGrp)

    detailGrp = display.newGroup ( )

    

    local fields = { 

        {"App: " … listRecs[idx].name, size=16, color={0,0,0}, font=“Marker Felt” }, 

        {"Category: " … listRecs[idx].category}, 

        {"Rating: "  … listRecs[idx].rating},

        }

    linePrinter(fields, 10, list.height + 20, detailGrp)

end

local function showRecords()

    

    local function onRowRender( event )

        local row = event.row

        local rowGroup = event.view

        local idx = row.index or 0

        local color = 0

        

        row.textObj = display.newRetinaText( listRecs[idx].name, 0, 0, “Helvetica”, 16 )

        row.textObj:setTextColor( color )

        row.textObj:setReferencePoint( display.CenterReferencePoint )

        row.textObj.x = display.contentWidth/2

        row.textObj.y = rowGroup.contentHeight * 0.35

        

        row.textObj2 = display.newRetinaText( listRecs[idx].category, 0, 0, “Helvetica”, 12 )

        row.textObj2:setTextColor( color )

        row.textObj2:setReferencePoint( display.CenterLeftReferencePoint )

        row.textObj2.x = 20

        row.textObj2.y = rowGroup.contentHeight * 0.65

        

        local function delRow( event )

            print("Delete hit: " … tostring(event.target.id))

            local dbid = listRecs[event.target.id].id

            list:deleteRow(event.target.id)

            table.remove(listRecs, event.target.id)

            display.remove( detailGrp )

            – delete from database

            – deleteData(dbid)

        end

        

        row.delButton = widget.newButton{

            id = row.index,

            top = rowGroup.contentHeight * 0.2,

            left = rowGroup.contentWidth - 90,

            default = “deletebtn.png”,

            width = 64, height = 33,

            onRelease = delRow

        }

        row.delButton.alpha = 0

        

        

        if listRecs[idx].showDel == true then

            row.delButton.alpha = 1

        end

        

        rowGroup:insert(row.delButton)

        rowGroup:insert(row.textObj)

        rowGroup:insert(row.textObj2)

        

    end – onRowRender

    

    

    

    local function rowListener( event )

        local row = event.row

        local background = event.background

        local phase = event.phase

        

         if phase == “press”  and  [row.index] = 1 then

        

            print( "Pressed row: " … row.index ) 

            background:setFillColor( 196, 255, 156, 255 )

            row.reRender = true

        

            

    

            

            

            

            

            – go to new scene

            

        elseif phase == “swipeLeft” then

            print( "Swiped Left row: " … row.index )

            listRecs[row.index].showDel = true

            row.reRender = true

                

        elseif phase == “swipeRight” then

            print( "Swiped Right row: " … row.index )

            listRecs[row.index].showDel = false

            display.remove( row.delButton )

            row.reRender = true

        end

        

        

    end – rowListener

    

    for x = 1, #listRecs do

        list:insertRow {

            onRender = onRowRender,

            listener = rowListener

            

        }

    end    

    

   end  

function scene:createScene( event )

local group = self.view

         local tab = display.newImage(“tabar.png”) 

        tab:setReferencePoint( display.BottomLeftReferencePoint )

        tab.y = display.contentHeight

        tab:toFront()

         group:insert( tab)

         

        

         local rbutton = widget.newButton  { 

        default = “religion2.png” ,

        over = “religion.png”,

          width = 35 ,

          height = 35 ,

         onEvent = bGo

          }

         group:insert( rbutton)

          rbutton:setReferencePoint( display.BottomLeftReferencePoint )

        rbutton.x = 7

        rbutton.y = display.contentHeight/2.97

        

        

        

          

         local dbutton = widget.newButton {

         default = “doctrine2.png” ,

         over = “doctrine.png”,

         width = 50,

         height = 42,

         onEvent = bGo1

         }

          group:insert( dbutton)

        dbutton:setReferencePoint( display.BottomLeftReferencePoint )

        dbutton.x = 1

        dbutton.y = display.contentHeight/1.8

        

        

         local tbutton = widget.newButton {

         default = “topic2.png” ,

         over = “topic.png”,

         width = 35,

         height = 35,

         onEvent = bGo2

         }

            group:insert( tbutton)

        tbutton:setReferencePoint( display.BottomLeftReferencePoint )

        tbutton.x = 7

        tbutton.y = display.contentHeight/1.32

      

        

         local hbutton = widget.newButton {

         default = “home2.png”,

         over = “home.png”,

         width = 35,

         height = 35,

         onEvent = bGo3

         }

         group:insert( hbutton)

        hbutton:setReferencePoint( display.BottomLeftReferencePoint )

         hbutton.x = 7

        hbutton.y = display.contentHeight/8

       

        

         local sbutton = widget.newButton {

         default= “settings2.png” ,

         over = “settings.png”,

         width = 35,

         height = 35,

         onEvent = bGo4

         }

     group:insert( sbutton)

        sbutton:setReferencePoint( display.BottomLeftReferencePoint )

         sbutton.x = 7

        sbutton.y = display.contentHeight/1.05

       

        db = setUpDatabase(“mydatabase2.sqlite”)

          setupInterface()

             loadData()

           showRecords()

        

    

    

end – showRecords

function scene:enterScene( event )

end

function scene:exitScene( event )

local group = self.view

list:removeSelf()

bg:removeSelf()

end

function scene:destroyScene( event )

end

scene:addEventListener( “createScene”, scene )

scene:addEventListener( “enterScene”, scene )

scene:addEventListener( “exitScene”, scene )

scene:addEventListener( “destroyScene”, scene )

return scene

you need to use onRowTouch event and listener. Suggest a review of the tableView sample in Widget Demo sample code from Corona Labs. This use is well demonstrated there. Hope this helps.

Where do i suggest a review? i have tried an onrowtouch and it wouldnt work but at this point i will try anything

Look at the Corona SDK Samples installed on your PC/Mac. You will see an Interface sub-folder. In there search for Widget Demo.

 if phase == “press”  and row.index == 1 == true  then

         storyboard.gotoScene(“roman”) was my fix…thx

you need to use onRowTouch event and listener. Suggest a review of the tableView sample in Widget Demo sample code from Corona Labs. This use is well demonstrated there. Hope this helps.

Where do i suggest a review? i have tried an onrowtouch and it wouldnt work but at this point i will try anything

Look at the Corona SDK Samples installed on your PC/Mac. You will see an Interface sub-folder. In there search for Widget Demo.

 if phase == “press”  and row.index == 1 == true  then

         storyboard.gotoScene(“roman”) was my fix…thx