iOS Question CallBack Module not Initialized

joilts

Member
Licensed User
Longtime User
Hi to all,

I'm trying to write a class code that receives a call back object and event. Looked over Table and CustomListView class as example and created an initialize method for my class.

B4X:
Sub Class_Globals
    Private Callback As Object
    Private Event As String
End Sub


Public Sub Initialize(CallbackModule As Object, EventName As String)
    Dim DataList As List = Array As String("pla.traineddata","man.traineddata","p24.traineddata")
    iOCR.Initilize(True,"iOCR",DataList,File.DirDocuments,"pla")
    'Initialize imgTransformation
    imT.Initialize
    Callback = CallbackModule
    Event = EventName
End Sub

When my code module call this method (like this an.Initialize(Me, "ocr") ) , CallbackModule is not initialized. And when my class code tries to return to the caller, nothing happens.
B4X:
Sub finishedjob
    Log("ANPR - final = "&resultPlate)
    If SubExists(Callback, Event & "_jobDone", 1) Then
        CallSub2(Callback, Event & "jobDone", resultPlate)
    End If
End Sub

I'm probably missing some detail. Any clue?

Thanks,
Jorge
 

joilts

Member
Licensed User
Longtime User
Sorry for that. My mistake.
An underscore was missed. But the Callback object still showing "not initialize" at debug. But with the underscore my return method was called.
Sorry once again.
 
Upvote 0
Top