Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

JSON for each issue
Started by chris.kendricks07 May 06 2014 11:32 AM

2 replies to this topic
json loop issue
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

chris.kendricks07

[GLOBAL: userInfoPane.html]
chris.kendricks07
  • Observer

  • 4 posts
  • Corona SDK

Hi,

 

I'm willing to pay for help, I make a request to twilio and loop through the results and create a table view. Everything works fine in the simulator but when I test my app on a real device it doesn't work, please help me, my code is below and I also attached a file

local data = loadsave.loadTable("numbers.json").available_phone_numbers
  
local function onRowRender( event )
  local row = event.row
  local params = event.row.params
  local rowHeight = row.contentHeight
  local rowWidth = row.contentWidth

  local rowTitle = display.newText( row, params.friendly_name, 0, 0, nil, 14 )
  rowTitle:setFillColor( 0 )
  
  rowTitle.anchorX = 0
  rowTitle.x = 10
  rowTitle.y = rowHeight * 0.5
 end
 
local myList = widget.newTableView {
  top = 50, 
  width = display.contentWidth, 
  height = display.contentHeight,
  onRowRender = onRowRender
 }
  
 for i = 1, #data do
    myList:insertRow{
      isCategory = false,
      params = {
        friendly_name = data[i].friendly_name
      }
    }
 end

Attached Files



[TOPIC: post.html]
#2

chris.kendricks07

[GLOBAL: userInfoPane.html]
chris.kendricks07
  • Observer

  • 4 posts
  • Corona SDK

FIXED IT!



[TOPIC: post.html]
#3

howeyweb

[GLOBAL: userInfoPane.html]
howeyweb
  • Observer

  • 20 posts
  • Corona SDK

How did you fix it?




[topic_controls]
[/topic_controls]