Android Question Wait For CallSub?

Brian Michael

Active Member
Licensed User
Hello, I'm trying to do a WaitFor on a CallSub but it doesn't do anything.

Here I share my code:

On my Lib i have this:

B4X:
If SubExists(mCallBack, mEventName & "_Hide") Then
    CallSub3(mCallBack, mEventName & "_Hide", Me, Manual)
End If

And im trying to get _Hide in my code:
B4X:
Wait For P_Hide(PopUp As BMPopUp, Manual As Boolean)

But its not working.
 

Alexander Stolte

Expert
Licensed User
Longtime User
If SubExists(mCallBack, mEventName & "_Hide") Then
The method is also not cross-platform, as a 3rd parameter is required in B4I, so your CustomView would have an error on B4I. Use the SubExists function from the XUI library.
 
Upvote 0

Brian Michael

Active Member
Licensed User
Hi, i try with:

B4X:
Dim PopUp as BMPopUp
'DESING CODE...


Wait For (PopUp.Show2) Complete(R As Object)
Wait For PopUp_Hide(P As BMPopUp, Manual As Boolean)
Log("Hide")

But its not doing the Log("Hide")
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
But its not doing the Log("Hide")
The right syntax for this is:
B4X:
    If xui.SubExists(mCallBack, mEventName & "_Hide",2) Then
        CallSub3(mCallBack, mEventName & "_Hide", Me, Manual)
    End If

B4X:
Wait For PopUp_Hide(P As BMPopUp, Manual As Boolean)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…