iOS Question Problem with SafariController

Discussion in 'iOS Questions' started by martin24, Oct 7, 2018.

  1. martin24

    martin24 Member Licensed User

    When I use the SafariController to open an URL, everything works fine.

    When I display a Message Box before opening that URL, the App completely hangs. I can can reproduce this with the latest version 5.30 and Hosted Builder.

    Below the code that does not work here. Any ideas what could be wrong?

    'Code module
    #Region  Project Attributes
    #ApplicationLabel: B4i Example
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
        #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 7
    #End Region

    Sub Process_Globals
    'These global variables will be declared once when the application starts.
        'Public variables can be accessed from all modules.
        Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Private Button1 As Button
    Private Button2 As Button
    Private Safari As SafariController
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
        NavControl = Nav
        Page1.Title = 
    "Page 1"
        Page1.RootPanel.Color = 
    "Button1", Button1.STYLE_SYSTEM)
    "Button2", Button2.STYLE_SYSTEM)
        Button1.Text = 
        Button2.Text = 
    End Sub

    Sub Button1_Click
    End Sub

    Sub Button2_Click
    Msgbox2("Msg""Open?""Open"Array ("Yes""No"))
    Wait For Msg_Click (ButtonText As String)
    If ButtonText = "Yes" Then
    End If
    End Sub
  2. Erel

    Erel Administrator Staff Member Licensed User

    Moved to the questions forum.

    Try to add Sleep(500) after the Wait For line.
    BillMeyer likes this.
  3. martin24

    martin24 Member Licensed User

    Thanks, that works.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice