Brian Michael Active Member Licensed User Longtime User May 1, 2024 #1 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: Copy If SubExists(mCallBack, mEventName & "_Hide") Then CallSub3(mCallBack, mEventName & "_Hide", Me, Manual) End If And im trying to get _Hide in my code: B4X: Copy Wait For P_Hide(PopUp As BMPopUp, Manual As Boolean) But its not working.
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: Copy If SubExists(mCallBack, mEventName & "_Hide") Then CallSub3(mCallBack, mEventName & "_Hide", Me, Manual) End If And im trying to get _Hide in my code: B4X: Copy Wait For P_Hide(PopUp As BMPopUp, Manual As Boolean) But its not working.
Erel B4X founder Staff member Licensed User Longtime User May 1, 2024 #2 Change it to CallSubDelayed3 Upvote 0
Alexander Stolte Expert Licensed User Longtime User May 1, 2024 #3 Brian Michael said: If SubExists(mCallBack, mEventName & "_Hide") Then Click to expand... 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 said: If SubExists(mCallBack, mEventName & "_Hide") Then Click to expand... 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.
Brian Michael Active Member Licensed User Longtime User May 1, 2024 #4 Hi, i try with: B4X: Copy 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
Hi, i try with: B4X: Copy 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")
Alexander Stolte Expert Licensed User Longtime User May 1, 2024 #5 Brian Michael said: But its not doing the Log("Hide") Click to expand... The right syntax for this is: B4X: Copy If xui.SubExists(mCallBack, mEventName & "_Hide",2) Then CallSub3(mCallBack, mEventName & "_Hide", Me, Manual) End If B4X: Copy Wait For PopUp_Hide(P As BMPopUp, Manual As Boolean) Upvote 0
Brian Michael said: But its not doing the Log("Hide") Click to expand... The right syntax for this is: B4X: Copy If xui.SubExists(mCallBack, mEventName & "_Hide",2) Then CallSub3(mCallBack, mEventName & "_Hide", Me, Manual) End If B4X: Copy Wait For PopUp_Hide(P As BMPopUp, Manual As Boolean)
Erel B4X founder Staff member Licensed User Longtime User May 1, 2024 #6 Unless you need the return value then it is better to use CallSubDelayed. Especially with Wait For. Upvote 0