Consider the following code fragment
I'm in a page other than B4XMainPage
I need to show a page (which gets created at the first run), close the current one and call a sub inside the new page
The code crashes because ShowPage and ClosePage appears to be async and BeginConnection starts when the page is still being created and some views used by BeginConnection are not yet available
What's the correct way to wait for page completion before continuing?
B4X:
Dim dwp As DataWizardPage = B4XPages.GetPage("DataWizardPage")
B4XPages.ShowPage("DataWizardPage")
B4XPages.ClosePage(Me)
dwp.BeginConnection
I'm in a page other than B4XMainPage
I need to show a page (which gets created at the first run), close the current one and call a sub inside the new page
The code crashes because ShowPage and ClosePage appears to be async and BeginConnection starts when the page is still being created and some views used by BeginConnection are not yet available
What's the correct way to wait for page completion before continuing?