Android Question Sub signature doesn't match expected signature

pantaraf

Member
Licensed User
Longtime User
Hi,
running my app in debug mode this call, from Activity1, works:
B4X:
Dim dato() As String
dato=Array As String("Test")
CallSubDelayed3(Activity2,"lv_ItemClick",Null,dato)

in release mode I always get the error message:
B4X:
An error has occurred in sub:
java.lang.Exception: Sub lv_itemclick signature doesn't match expected signature

The sub is declared as follow in the second activity:
B4X:
Sub lv_ItemClick (Position As Int, Value As Object)

Is this related to a wrong data type cast from me?
lv_ItemClick expects an int and an Object, I call it using a null and a string array.

Thank you.
Raffaele
 

DonManfred

Expert
Licensed User
Longtime User
yes, null is not a int. Sounds possible that you are doing a wrong typecast there. But i´m not sure
 
Upvote 0

pantaraf

Member
Licensed User
Longtime User
Great. Now it seems to be working! :p
I'm calling it using 0 instead of Null: solved.
B4X:
CallSubDelayed3(Activity2,"lv_ItemClick",0,dato)
Thanks ;)
Raffaele
 
Upvote 0
Top