Hi All,
I'm examine an error in FlickrView demo.
If I have a sub:
What the +1 means in this case, cause the error log says:
If I delete the +1: all the images quickly went by.
And -1: one image will be displayed.
So why the +1 is working on the original FlickrView demo and
not in my Flickr test demo, causing an error.
The differences between the two are fetching the web url and "links.add"
I'm examine an error in FlickrView demo.
If I have a sub:
B4X:
Sub ImageUrlDone (Url As String)
ivs(ImageIndex).Bitmap = HttpUtils.GetBitmap(Url)
ivs(ImageIndex).Gravity = Gravity.FILL
ImageIndex = ImageIndex + 1
End Sub
What the +1 means in this case, cause the error log says:
java.lang.ArrayIndexOutOfBoundsException
** Activity (main) Resume **
Starting Job: Main page
** Service (httputilsservice) Create **
** Service (httputilsservice) Start **
done parsing main page: 23
Starting Job: Images
** Service (httputilsservice) Start **
main_imageurldone (B4A line: 97)
ivs(ImageIndex).Bitmap = HttpUtils.GetBitmap(Url)
java.lang.ArrayIndexOutOfBoundsException
at anywheresoftware.b4a.samples.flickr.main._imageurldone(main.java:548)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:89)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:760)
at anywheresoftware.b4a.keywords.Common.CallSub2(Common.java:747)
at anywheresoftware.b4a.samples.flickr.httputilsservice._response_streamfinish(httputilsservice.java:336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
at dalvik.system.NativeStart.main(Native Method)
java.lang.ArrayIndexOutOfBoundsException
If I delete the +1: all the images quickly went by.
And -1: one image will be displayed.
So why the +1 is working on the original FlickrView demo and
not in my Flickr test demo, causing an error.
The differences between the two are fetching the web url and "links.add"