iOS Question Modal question

Graeme Mitchell

Member
Licensed User
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]
 

Graeme Mitchell

Member
Licensed User
I think i have the msgbox2 working correctly, it waits for a response now but how do I get it to run the Goalkeeper Code Module, complete it, then after it closes run LoadOptionsGoalkeeper. The Goalkeeper code module needs to complete and save the data before the LoadOptionsGoalkeeper can do its thing
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…