According to API, the loadRemoteImage() function should return a table value (=object).
After execution of this code, I receive:
image1 = nil.
local function networkListenerIm( event )
if ( event.isError ) then
print ( “Network error - download failed” )
else
event.target.alpha = 0
transition.to( event.target, { alpha = 1.0 } )
end
print ( "RESPONSE: " … event.response )
end
local function onRowRender( event )
local group = event.view
local row = event.target
print ("event.index = "…event.index)
print("data = "…data[event.index].title)
local pictureURL = “https://graph.facebook.com/10000248xxxxxxx/picture”
local image1 = display.loadRemoteImage( pictureURL , “GET”, networkListenerIm, “”…event.index…“d.png”, system.DocumentsDirectory,30 , 50 )
if (image1) then
group:insert(image1)
else
print (“Sorry, the image is loaded as nil object”)
end
group:insert( text )
end
Is it Corona’s bug or does I miss something here? Thanks [import]uid: 144261 topic_id: 29190 reply_id: 329190[/import]
[import]uid: 52491 topic_id: 29190 reply_id: 117524[/import]