I am trying to run the following code but when it runs the check_Goalkeepers, drops into that sub but then runs check_Opponents right after without waiting or doing anything in the check_Goalkeepers sub
B4X:
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "StatApp Soccer"
Page1.RootPanel.Color = Colors.White
App.IdleTimerDisabled = True
Page1.RootPanel.LoadLayout("InputForm")
NavControl.ShowPage(Page1)
Dim homeawaylist As List
homeawaylist.Initialize
homeawaylist.add("Home")
homeawaylist.Add("Away")
homeawaylist.Add("Neutral")
ListHomeAway.SetItems(0,homeawaylist)
check_Goalkeepers
check_Opponents
End Sub
Sub check_Goalkeepers
Dim MyPath As String = File.DirDocuments
Dim Data As Map
If File.Exists(MyPath, "Goalkeepers.txt") = False Then
Goalkeepers.show
Else
Msgbox2("msgRG", "Delete goalkeeper file?", "Delete?", Array ("Yes","No"))
End If
End Sub
Sub check_Opponents
Dim MyPath As String = File.DirDocuments
If File.Exists(MyPath, "Opponents.txt") = False Then
Opponents.show
Else
Msgbox2("msgRO", "Delete Opponent file?", "Delete?", Array ("Yes","No"))
End If
End Sub
[\code]