I am suffering from the error below.
When using display.loadRemoteImage(), there may be times when the table is already missing after loading the image.
(For example, after moving the screen or closing the window)
I check the function as follows, but it does not work well.
I can not avoid this problem because I think that display.loadRemoteImage() is not prepared for cancellation.
Please tell me how to check whether the function in the table is valid or how to cancel display.loadRemoteImage().
/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_scrollview.lua:464: attempt to call method ‘insert’ (a nil value)
local scrollView = widget.newScrollView
{
—
}
local function networkListener( event )
if ( event.isError ) then
else
if event.status == 200 then
if type(scrollView.insert) == “function” then
scrollView:insert( event.target )
end
end
end
end
display.loadRemoteImage( IMG_URL, “GET”, networkListener, IMG_NAME, system.TemporaryDirectory, 0, 0 )