One of my routines in the main B4XPage contains this code, which worked fine when it was part of an Activity::
Now, when I click on the "Configure" button, it switches to the "B4XPTMM_PreferencesID" page as desired - BUT the message box remains on the screen.
Hitting the "Exit" button closes it.
B4X:
Msgbox2Async ("Sorry - could not find the MusicBase database file." & CRLF & _
File.Combine(cmTMM.gsDBPath,cmTMM.gsDBFileName) & _
" Do you want to change the configuration settings," & CRLF & _
"or Exit Music Machine?","Music Machine Database", _
"Configure",cmTMM.NULLSTRING,"Exit",cmTMM.gbmpLogo36x36, False)
Wait For MsgBox_Result (iResult As Int)
If iResult = DialogResponse.POSITIVE Then
' Return to the settings file
B4XPages.ShowPage ("B4XPTMM_PreferencesID")
Return
Else
B4XPages.ClosePage(Me)
Return
End If
Now, when I click on the "Configure" button, it switches to the "B4XPTMM_PreferencesID" page as desired - BUT the message box remains on the screen.
Hitting the "Exit" button closes it.