I don’t have any text. The entire scene is a newRec as a background. 2 simple newImageRect as a logo and facebook icon, and the tableView with each row having a small newImageRect
I studied the porting guide and understand about the issue with the display.newText (I’ve commented them all out until I implement the bitmap fix).
Here is the code:
local function onRowRender( event ) -- Get reference to the row group local row = event.row local buttons = event.row.params.buttons --local labels = event.row.params.labels local icon, label -- Cache the row "contentWidth" and "contentHeight" because the row bounds can change as children objects are added local rowHeight = row.contentHeight local rowWidth = row.contentWidth icon = display.newImageRect(row, buttons, 56, 56) icon.anchorX = 0 icon.x = 0 icon.y = rowHeight \* 0.5 --label = display.newText( { parent = row, text = labels, 0, 0, font = BerlinSansFB, fontSize = 20, width = 100}) --label.anchorX = 0 --label.x = icon.x + icon.contentWidth + 10 --label.y = rowHeight \* 0.5 --label:setFillColor(0.15, 0.4, 0.729, 0.90) return true end function scene:create( event ) local sceneGroup = self.view --BerlinSansFB = "BerlinSansFB-Reg.tff#Berlin Sans FB" myData.inch = false going = {} going.num = 1 back = display.newRect( sceneGroup, display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) backEdgeX = back.contentBounds.xMin backEdgeY = back.contentBounds.yMin Runtime:addEventListener( "key", onKeyEvent ) logo = display.newImageRect(sceneGroup, "Images/title.png", 175, 100) logo.x = backEdgeX + 10 logo.anchorX = 0 logo.anchorY = 0.5 logo.y = logo.contentHeight / 2 + 40 topBar = display.newRect( sceneGroup, 0, 0, display.contentWidth, 30 ) topBar:setFillColor(0.15, 0.4, 0.729, 0.75) topBar.anchorX = 0 topBar.anchorY = 0 facebookButt = display.newImageRect(sceneGroup, "Images/facebook.png", 42, 42) facebookButt.anchorX = 0 facebookButt.anchorY = 0.5 facebookButt.x = logo.x facebookButt.y = logo.y \* 2 facebookButt:addEventListener ( "touch", goingFacebook ) butTable = {} labelTable = {} butTable[1] = "Images/rightMenu.png" butTable[2] = "Images/obliqueMenu.png" butTable[3] = "Images/sineMenu.png" butTable[4] = "Images/boltMenu.png" butTable[5] = "Images/speedMenu.png" butTable[6] = "Images/counterButt.png" butTable[7] = "Images/chartMenu.png" butTable[8] = "Images/mattButt.png" menuList = widget.newTableView{ left = logo.x + logo.contentWidth + 10, top = topBar.contentHeight, width = display.contentWidth - (logo.x + logo.contentWidth + 10) - 10, height = display.contentHeight - topBar.contentHeight, --onRowTouch = onRowTouch, onRowRender = onRowRender, hideScrollBar = false, noLines = true, } sceneGroup:insert(menuList) for i = 1, #butTable, 1 do local isCategory = false local rowHeight = 65 local rowColor = { default={ 1, 1, 1 }, over={ 0.15, 0.4, 0.729, 0.2 } } local lineColor = { 0.15, 0.4, 0.729 } menuList:insertRow( { isCategory = isCategory, rowHeight = rowHeight, rowColor = rowColor, lineColor = lineColor, params = { buttons = butTable[i] } } ) end end
However I did just notice that the output window is occasionally spitting out the following line (every minute or so?) while the app just sits open:
The thread 0x8c8 has exited with code 259 (0x103)
The bolded part is a different 0xXXX every time. However this happens with the emulator as well, and as I mentioned the emulator works perfectly.