Well, okay…
Also I just discovered that the text was the only thing that shows because it was the last thing that I insert into the scene group… When I tried to insert the tableView the last thing it appeared and the text didn’t
[lua]
function scene:create( event )
local sceneGroup = self.view
local ox, oy = math.abs(display.screenOriginX), math.abs(display.screenOriginY)
local sceneBackground = display.newImageRect( “background.png”, 850, 1250 )
local chooseText = display.newText(sceneInformation.sceneTitle, 150, 50, native.systemFontBold, 20, “center” )
local tableViewColors = {
rowColor = { default = { 1 }, over = { 30/255, 144/255, 1 } },
lineColor = { 220/255 },
catColor = { default = { 150/255, 160/255, 180/255, 200/255 }, over = { 150/255, 160/255, 180/255, 200/255 } },
defaultLabelColor = { 0, 0, 0, 0.6 },
catLabelColor = { 0 }
}
tableViewColors.rowColor.default = { 48/255 }
tableViewColors.rowColor.over = { 72/255 }
tableViewColors.lineColor = { 36/255 }
tableViewColors.catColor.default = { 80/255, 80/255, 80/255, 0.9 }
tableViewColors.catColor.over = { 80/255, 80/255, 80/255, 0.9 }
tableViewColors.defaultLabelColor = { 1, 1, 1, 0.6 }
tableViewColors.catLabelColor = { 1 }
local tableView = widget.newTableView
{
left = 10,
top = 100,
height = 400,
width = 300,
onRowRender = onRowRender,
onRowTouch = onRowTouch,
--listener = scrollListener
}
for i=0, #sceneInformation[tableViewLoop] do
if i == 0 then
text = sceneInformation[tableViewLoop].category_1
isCategory = true
rowHeight = 40
rowColor = {
default = tableViewColors.catColor.default,
over = tableViewColors.catColor.over
}
elseif i == 47 then
text = sceneInformation[tableViewLoop].category_2
isCategory = true
rowHeight = 40
rowColor = {
default = tableViewColors.catColor.default,
over = tableViewColors.catColor.over
}
else
text = sceneInformation[documentNames][i][1]
isCategory = false
rowHeight = 36
rowColor = {
default = tableViewColors.rowColor.default,
over = tableViewColors.rowColor.over,
}
end
tableView:insertRow(
{
isCategory = isCategory,
rowHeight = rowHeight,
rowColor = rowColor,
lineColor = tableViewColors.lineColor,
params = {rowText=text},
}
)
end
sceneGroup:insert( chooseText )
sceneGroup:insert( sceneBackground )
sceneGroup:insert( tableView )
end
[/lua]