Android Question Translating an old app to B4XPages: MsgBox fails to close

GuyBooth

Active Member
Licensed User
Longtime User
One of my routines in the main B4XPage contains this code, which worked fine when it was part of an Activity::

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.
 

GuyBooth

Active Member
Licensed User
Longtime User
I feel like a redraw (invalidate) might be needed - but what would I invlidate?
 
Upvote 0
Top