I’ve been working on a maintain selected-row display solution and have come across this runtime error when scrolling tableview. (the top 3 statements are from prints where I’ve been trying to localize the actual error)
I/Corona (11040): iNew= true
I/Corona (11040): showing selected
I/Corona (11040): calling reload
I/Corona (11040): ERROR: Runtime error
I/Corona (11040): /data/data/com.masterboltdevelopment.sdzAdmin/files/coronaResources/tableView.lua:397: attempt to call method ‘setFillColor’ (a nil value)
I/Corona (11040): stack traceback:
I/Corona (11040): /data/data/com.masterboltdevelopment.sdzAdmin/files/coronaResources/tableView.lua:397: in function ‘touch’
I/Corona (11040): /data/data/com.masterboltdevelopment.sdzAdmin/files/coronaResources/tableView.lua:913: in function ‘func’
I/Corona (11040): /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:195: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:182>
I/Corona (11040): applicationExit or applicationSuspend: db closed
It “appears” to be when there is a partial row displayed at the bottom, though I’m not touching it on the scroll. I seem to remember that there was an error related to that some time ago. I’m on 2017.3068, though I just updated today. Prior I was on 2017.3068 and it also happened there.
my code: in the onTouch listener
local function onFromRowTouch(event) local phase = event.phase local row = event.target local id = row.index local t = row.params.rowSlot local iNew = false fromRowSelectedPair = row.params.pairCode or "" fromRowSelectedID = row.params.rowDataID resetFromTable() -- set all arrayElements to untouched print("done reset") if (t and t ~= 0) then print("got rowSlot") if (fromTable[t] == false) then iNew = true else iNew = false end print("iNew=",iNew) fromTable[t] = iNew if (fromTable[t] == true) then print("showing selected") row.selOn.isVisible = true row.selOff.isVisible = false else print("showing not selected") row.selOn.isVisible = false row.selOff.isVisible = true end end print("calling reload") deviceTableViewFrom:reloadData() end