Please Help.
If i clear ShopListView with the Clearall and reload items in list gives me an out of bound error. (if you dont change index in the list,remain to the top ,does not gives you the error)
Error occurred on line: 686 (ShopListView)
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-2
at java.util.ArrayList.get(ArrayList.java:439)
at anywheresoftware.b4a.objects.collections.List.Get(List.java:117)
at b4a.example.shoplistview._invalidateimage(shoplistview.java:1581)
at b4a.example.shoplistview._invalidate(shoplistview.java:196)
at b4a.example.shoplistview._clearall(shoplistview.java:105)
at b4a.example.main._button2_click(main.java:641)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7881)
at android.widget.TextView.performClick(TextView.java:16203)
at android.view.View.performClickInternal(View.java:7858)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30863)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8775)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
If i clear ShopListView with the Clearall and reload items in list gives me an out of bound error. (if you dont change index in the list,remain to the top ,does not gives you the error)
Error occurred on line: 686 (ShopListView)
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-2
at java.util.ArrayList.get(ArrayList.java:439)
at anywheresoftware.b4a.objects.collections.List.Get(List.java:117)
at b4a.example.shoplistview._invalidateimage(shoplistview.java:1581)
at b4a.example.shoplistview._invalidate(shoplistview.java:196)
at b4a.example.shoplistview._clearall(shoplistview.java:105)
at b4a.example.main._button2_click(main.java:641)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:205)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7881)
at android.widget.TextView.performClick(TextView.java:16203)
at android.view.View.performClickInternal(View.java:7858)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30863)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8775)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)