Android Question Unexpected event in my library

GuyBooth

Active Member
Licensed User
Longtime User
I have built a library that I thought was pretty straightforward. Because of the issues around the error
Unexpected event (missing RaiseSynchronousEvents) I included #RaisesSynchronousEvents statements - but I am still receiving the errors.

The code is as follows:
B4X:
' Class MultiInputTrigger
#RaisesSynchronousEvents: PullTheTrigger
#RaisesSynchronousEvents: tmrTimeOut_Tick
Sub Class_Globals
    Private oCallback As Object
    Private iTriggers As Int
    Private sEventName As String
    Private tmrTimeOut As Timer
End Sub
'Initialize the object.
Public Sub Initialize(Callback As Object, EventName As String, TriggerQty As Int, TimeOutmSecs As Int)
    ' <EventName>_Trigger is the Event to be called.
    ' TimeoutEvent is the event To call back To If the trigger fails To take place within the Timeout interval.
    oCallback = Callback
    sEventName = EventName
End Sub
' Call back to the Event to be Triggered
Private Sub PullTheTrigger
    ' Some code ...
    ' Call the Event
    CallSub(oCallback, $"${sEventName}_Trigger"$)
End Sub
' If the timer times out do this
Private Sub tmrTimeOut_Tick
    ' Stop the TimeOut timer
    tmrTimeOut.Enabled = False
    ' Some code ...
    ' Call back to TimeOutEvent
    If Not(IsPaused(oCallback)) Then CallSub(oCallback, $"${sEventName}_TimeOut"$)
End Sub

When I Initialize an instance using the code:
B4X:
mitMP_Complete(Me, "mitMP_Complete", 2, 1000)
I am receiving the error:
B4X:
Unexpected event (missing RaiseSynchronousEvents): mitmp_complete_trigger
Check the unfiltered logs for the full stack trace.

I notice that in the error message the Unexpected Event is in lower case. Is the case of the called event a problem? Otherwise can anybody help me resolve this? What am I doing wrong here?
Thanks.
 
Top