I am converting an old B4A program to B4XPages. It uses adding menu items. I get it all to work but when the back button is hit while pnlChangeRange panel is viewed the app goes away after the return at the end of the B4XPage_CloseRequest sub. The IDE stays active to the app meaning the Stop icon is still enabled. This is in both Debug and Release mode. The log is not giving me any error in both filtered and unfiltered. Not sure where the return goes. I am assuming that I need to do something somewhere in my code with the return. I did not have any success in scouring this forum for any solution.
B4X:
B4XPages.AddMenuItem(Me, "Change Detection Range")
...
Sub B4XPage_MenuClick (Tag As String)
...
Select Tag
Case "Change Detection Range"
ChangeFindRange
...
End Sub
Sub ChangeFindRange
pnlProtect.BringToFront
pnlChangeRange.BringToFront
bChange = True
End Sub
Private Sub B4XPage_CloseRequest As ResumableSub
...
If bChange Then
pnlChangeRange.SendToBack
If Not(bWeb) Then pnlProtect.SendToBack
bChange = False
End If
...
Return True <== issue is after this line
End Sub