Android Question CallSub2 from List doesn't work

sanduro

Member
Licensed User
Longtime User
Hi

I have a diferent classes added to object list.

When I try to call the setContext method , i get an error. I inculde the zip

B4X:
Dim myName As String
    For i = 0 To PANELS.Size - 1
        Log(PANELS.Get(i))
        myName = CallSub(PANELS.Get(i), "GetName")
        CallSub2(PANELS.Get(i), "setContext", "dummy")
        Next
    Activity.Invalidate


CallSub2(PANELS.Get(i), "setContext", "dummy")
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1


at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:871)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:815)
at b4a.example.main._timer1_tick(main.java:526)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)
at
 

Attachments

  • panelfw.zip
    27.3 KB · Views: 154
Top