Android Question ClsCheckList: CallSub3 is not working


Active Member
Licensed User
I'm trying to use the ClsCheckList class in a project but I'm facing a problem.
At line 1148 of the class, the SubExists is returning FALSE and the CallSub3 at line 1150 is not executing.
Even if I exclude the SubExists and call directly it can't find the call back routine.
I tried in 2 android phones, sony z3 and samsung note 4, both with android 5.1.1 and the same result.
The callback routine is at the Main module, lstClick, as refered in the lst.initialize.
The lstClick sub is never executed.
Project is attached as zip.
Thanks for any help.

Private Sub pnlSV_Click(ViewTag As Object) As Boolean
    Dim pnl As Panel
    pnl = Sender
    Msgbox(CallbackMod & " - " & sub_Click,SubExists(CallbackMod, sub_Click)) 
    If SubExists(CallbackMod, sub_Click) Then
        CallSub3(CallbackMod, sub_Click, pnl, pnl.Tag)
    End If
    Return True
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim sv As ScrollView
    Dim lst As ClsCheckList 
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    lst.DividerColor = Colors.Black 
    For i=1 To 10
        lst.AddItemNoChkbx(0,"Test ",i,Null)
End Sub

Sub lstClick
End Sub


    15.9 KB · Views: 113


Active Member
Licensed User
I think I've found the solution.
the names of the subs must have the name of the object (lst) and an underscore before the name of the callback sub.
I changed the names to lst_click in the sub and in the initialize method and now it works.
I really don't know why, but thats it!
Thank you all.
Upvote 0