Hello All,
I am using Rob Miracles RSS Parser and it works great. I got my RSS feed to show up in the terminal. Now I am trying to get it to show up on my device. I am using the table view widget. and my code is below. The Mask file is showing up but nothing else is. I just can’t figure out what I am doing wrong. Just want something to show up on the screen. Any help would be appreciated.
Using build 1094.
Terminal shows 15 stories
local function showTableView() local function tableViewListener( event ) print( "event phase" ,event.phase ) end print("Calling showTableView()") --native.setActivityIndicator( true ) tableView = widget.newTableView { top = 64+50, width = 320, height = 320, maskFile = "mask.png", listener = tableViewListener, onRowRender = onRowRender, onRowUpdate = onRowUpdate, onRowTouch = onRowTouch, } group:insert(tableView) local function onRowRender(event) print("row render") local row = event.target local row = event.row local id = event.index if event.index \> #stories then return true end print(id) print(stories[id].title) row.bg = display.newRect(0, 0, display.contentWidth, 60) row.bg:setFillColor(217, 238, 221, 224) if id % 2 == 1 then row.bg:setFillColor(213, 230, 228, 224) end row:insert(row.bg) row.icon = display.newImageRect(itemIcon.image, itemIcon.width , itemIcon.height ) row.icon:setReferencePoint(display.TopLeftReferencePoint) row.icon.x = itemIcon.paddingLeft row.icon.y = 2 local myTitle = string.sub(stories[id].title, 1, 22) row.title = display.newRetinaText( myTitle, 12, 0, "Helvetica-Bold", 18 ) row.title:setReferencePoint( display.CenterLeftReferencePoint ) row.title.y = itemIcon.paddingTop row.title.x = itemIcon.paddingLeft + itemIcon.paddingRight + itemIcon.width row.title:setTextColor( 96, 96, 96, 255 ) row:insert(row.icon) row:insert( row.title ) end
Thanks
Alberto