iOS Question TabStrip error

Discussion in 'iOS Questions' started by rfresh, Jul 14, 2019 at 5:42 PM.

  1. rfresh

    rfresh Well-Known Member Licensed User

    I'm trying to have a look at the TabStrip example but am getting an error on line 33 which has to do with the Main designer file.

    I'm not sure what the problem is.

    Thank you...

    Three attachments below.

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Please post the code and error message as text.
  3. rfresh

    rfresh Well-Known Member Licensed User

    OK, here is the error msg and the code:

    Error message:

    Error occurred on line: 33 (Main)
    Target is null. Method called: _initialize:::
    Stack Trace: (
    CoreFoundation <redacted> + 252
    libobjc.A.dylib objc_exception_throw + 56
    CoreFoundation <redacted> + 0
    B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 192
    B4i Example -[B4ICustomViewWrapper AfterDesignerScript] + 2076
    B4i Example -[B4ILayoutBuilder loadLayout:::] + 2892
    B4i Example -[B4IPanelWrapper LoadLayout::] + 204
    B4i Example -[b4i_main _application_start:] + 1116
    CoreFoundation <redacted> + 144
    CoreFoundation <redacted> + 292
    B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
    B4i Example -[B4IShell runMethod:] + 448
    B4i Example -[B4IShell raiseEventImpl:method:args::] + 2172
    B4i Example -[B4IShellBI raiseEvent:event:params:] + 1580
    B4i Example __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
    libdispatch.dylib <redacted> + 24
    libdispatch.dylib <redacted> + 16
    libdispatch.dylib <redacted> + 1068
    CoreFoundation <redacted> + 12
    CoreFoundation <redacted> + 1924
    CoreFoundation CFRunLoopRunSpecific + 436
    GraphicsServices GSEventRunModal + 104
    UIKitCore UIApplicationMain + 212
    B4i Example main + 124
    libdyld.dylib <redacted> + 4


    '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 MainPage As Page

    'Private TabStrip1 As TabStrip
        Private WebView1 As WebView
    Private TabPages As List
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
        Dim nc As NavigationController
        NavControl = nc
    'NavControl = Nav
    Dim cs As CSBuilder
    Dim page1, page2, page3 As Page
        page1.Title = 
    Font.CreateFontAwesome(18)).Color(0xFF014E1C).VerticalAlign(-1).Append("Google ").Append(Chr(0xF17B)).PopAll
        SetAttributedTitle(page2, cs)
        SetAttributedTitle(page3, cs.Initialize.Color(
    End Sub

    Sub TabStrip1_PageSelected (Position As Int)
    Log("Current page: " & Position)
    End Sub

    Sub SetAttributedTitle(page As Page, cs As CSBuilder)
    Dim lbl As Label
        lbl.AttributedText = cs
    page.TitleView = lbl
    End Sub

    Private Sub Page1_Resize(Width As Int, Height As Int)
    End Sub

    Private Sub Application_Background
    End Sub
  4. Erel

    Erel Administrator Staff Member Licensed User

    Why is this line commented:
  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