Bug? B4i v2.0, Find VideoView with Page1.RootPanel.GetAllViewsRecursive

Discussion in 'iOS Bugs & Wishlist' started by Pendrush, Jul 9, 2015.

  1. Pendrush

    Pendrush Well-Known Member Licensed User

    If v Is VideoView is always false.

    '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
    #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 VideoV As VideoView
    Private btnFindView As Button

    End Sub

    Private Sub Application_Start (Nav As NavigationController)
        NavControl = Nav
        Page1.Title = 
    "Page 1"
        Page1.RootPanel.Color = 
    "btnFindView", btnFindView.STYLE_SYSTEM)

        btnFindView.Text = 
    "Find VV"
        btnFindView.Color = 
        VideoV.ShowControls = 
    End Sub

    Private Sub Page1_Resize(Width As Int, Height As Int)
        VideoV.View.Height = Height
        VideoV.View.Width = Width
        btnFindView.Top = Height - btnFindView.Height
        btnFindView.Left = Width - btnFindView.Width
    End Sub

    Private Sub Application_Background
    End Sub

    Public Sub PlayVideo
    End Sub

    Private Sub VideoV_Ready
    End Sub

    Private Sub btnFindView_Click
    For Each v As View In Page1.RootPanel.GetAllViewsRecursive
    If v Is VideoView Then
    Log("Found: " & v) '< This line is not executed
            End If
    'Log (v)
    End Sub

    As a workaround I use panel and add VideoView in panel, then remove all views from panel, that is only way to remove VideoView from page.
  2. Erel

    Erel Administrator Staff Member Licensed User

    This is the expected result as VideoView itself is not a view.
    Pendrush likes this.
  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