Java Question Raise Events not Triggering (Solved)

Marion Opperman

Member
Licensed User
Longtime User
Hi There, I am gaoing mad here, i cant figure out what is wrong. I have a method with 3 Raise events in it, 2 work and one does not. Here is the code:

1) Not Working
B4X:
 if (ba.subExists(eventName + "_started")) {
                ba.raiseEvent(this, eventName + "_started", ismIsBOMUserInitialized());                         
                 }

With this in B4a:
B4X:
Sub RegisterBom_Started (mIsBOMUserInitialized As Boolean)
    ProgressDialogHide
    ToastMessageShow("Device access ready.",False)
End Sub

2) This however (and the other event) work fine:
B4X:
if (ba.subExists(eventName + "_error")) {
          setNewRegistration(true);
          ba.raiseEvent(this, eventName + "_error", error);
          }

With this in B4a:
B4X:
Sub RegisterBom_Error (o As Object)
    Dim e As Exception
    e = o
    ProgressDialogHide
     Msgbox("Triggered Test Fail: " & e.Message,"")
End Sub

Here is the Events declaration in case:
B4X:
@Events(values={"Started (mIsBOMUserInitialized as Boolean)",
        "Reged (mIsBOMUserInitialized As Boolean)",
        "Error (Error as Object)"})

I have added toasts in the library which so me code running either side of the event that wont run.

Any help would be awesome!!!
 
Top