Java Question raiseEvent question

Star-Dust

Expert
Licensed User
Longtime User
I developed a class with a part written in line java.

During this part of the java code I call a sub B4A. But strangely she is not called. The logs continue correctly.
I can't understand why. I have used ba.raiseEvent many times without problems

SUB
B4X:
private Sub mysub_connected
    'never enters here
    If SubExists(mCallBack,mEvent & "_Ready") Then CallSubDelayed2(mCallBack,mEvent & "_Ready",True)
End Sub

in line Java
Java:
BA.Log("connected");
ba.raiseEvent(null, "mysub_connected");
BA.Log("connected2");

LOG
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
connected
connected2
 

DonManfred

Expert
Licensed User
Longtime User
 

Star-Dust

Expert
Licensed User
Longtime User
Thanks @DonManfred it works. I replaced with raiseEventFromUI and it works. Although I didn't understand why. :oops:
 
Top