Bug? ARGB Value lets Method not found

xunwichtig

Member
Licensed User
Longtime User
Hi,

i have written a class (XList). This Class has a sub what i call from a activity.

sub in class
B4X:
Public Sub List_Item_SetUnselectedBackgroundColorByIndex(V_Index As Int, V_Color As Int) As Int
'...
End Sub


activity
B4X:
'globals
Dim G_XList as XList '(Class)
Dim T_XList as Object = G_XList

sub foo()
Dim TTXList As XList = T_XList
TTXList.List_Item_SetUnselectedBackgroundColorByIndex(1, Colors.ARGB(124, 255, 155, 155))
End Sub

If i call the "foo" source, the function works with:
B4X:
TTXList.List_Item_SetUnselectedBackgroundColorByIndex(1, Colors.ARGB(124, 255, 255, 255))

but, if i change the ARGB Value to like:
B4X:
TTXList.List_Item_SetUnselectedBackgroundColorByIndex(1, Colors.ARGB(124, 255, 155, 155))

the execution will crash with:
B4X:
Error occurred on line: 384 (xlist)
java.lang.RuntimeException: Method: _list_item_setunselectedbackgroundcolorbyindex not found in: java.lang.Object
   at anywheresoftware.b4a.shell.Shell$MethodCache.getMethod(Shell.java:895)
   at anywheresoftware.b4a.shell.Shell.getMethod(Shell.java:549)
   at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:635)
   at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
   at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
   at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:863)
   at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:820)
   '...
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
   at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:305)
   at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
   at anywheresoftware.b4a.BA$3.run(BA.java:320)
   at android.os.Handler.handleCallback(Handler.java:725)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:176)
   at android.app.ActivityThread.main(ActivityThread.java:5279)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
   at dalvik.system.NativeStart.main(Native Method)

"Error occurred on line: 384 (xlist)" is this line:
B4X:
Public Sub List_Item_SetUnselectedBackgroundColorByIndex(V_Index As Int, V_Color As Int) As Int


JimJim
XUN
 
Top