sanduro Member Licensed User Longtime User Oct 2, 2013 #1 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 Code: Copy 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 panelfw.zip 27.3 KB · Views: 281
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 Code: Copy 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
sanduro Member Licensed User Longtime User Oct 2, 2013 #2 Oh got it, answer is CallSub3 becasue of 2 arguments San Upvote 0