iOS Question Porting Class Youtube from B4A to B4i

Discussion in 'iOS Questions' started by MarcoRome, Jan 13, 2018.

  1. MarcoRome

    MarcoRome Expert Licensed User

    I would like to make available the Youtube V3 class of the existing library currently in B4a (Library YouTube V3) in order to have a compatible class (B4X) for B4A / B4i.
    The class works perfectly in the B4A environment but in B4i I have the following error:

    The code is:

    'Class module
    Private Sub Class_Globals
    Type SearchVideo( _
    100As String, title(100As String, description(100As String, _
    100As String, urldefaultpicture(100As String, urlmediumpicture(100As String, idVideo(100As String, totalResults As Int, TotalChannel As Int, _
    100As String, prevpage(100As String )


    Private SVideo As SearchVideo
    End Sub

    Public Sub SearchVideo(maxresult As Int, search As String, order As String, regionCode As String, videoDuration As String, Module As Object, EventName As String )
    Dim su As StringUtils
        search = su.EncodeUrl(search, 
    '<----- THE ERROR IS HERE
        If order = "" Then
            order = 
    End If
    If videoDuration = "" Then
            videoDuration = 
    End If
    If regionCode = "" Then
    Dim job1 As HttpJob
    "searchvideo1", Me)
    ",snippet&order="& order &"&maxResults="& maxresult &"&videoDuration="& videoDuration &"&q="& search &"&key=" & keyvalue)
    Dim job1 As HttpJob
    "searchvideo1", Me)
    ",snippet&order="& order &"&maxResults="& maxresult &"&videoDuration="& videoDuration &"&regionCode="& regionCode &"&q="& search &"&key=" & keyvalue)
    End If
    '    Dim job1 As HttpJob
        '    job1.Initialize("search", Me)
    '    job1.Download(",snippet&maxResults="& maxresult &"&q="& search &"&key=" & keyvalue)
        'job1.GetRequest.SetHeader("Accept", "application/json")
        MN = Module
        EN = EventName
    End Sub

    Simply when i initialize
    Any help ?
    Thank you
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    Try to change the sub name or the type name.

    And I dont think that you are obligated ti initialize a type
    MarcoRome likes this.
  3. MarcoRome

    MarcoRome Expert Licensed User

    No, unfortunately the result does not change
  4. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the project?
  5. MarcoRome

    MarcoRome Expert Licensed User

  6. MarcoRome

    MarcoRome Expert Licensed User

    if i send this address back to me.
    Is it right ?
  7. MarcoRome

    MarcoRome Expert Licensed User

  8. Erel

    Erel Administrator Staff Member Licensed User

    The error happens because of the 'description' field in the custom types. It conflicts with the built-in description method. All objects include this method. I will add a compiler check for this.
    MarcoRome 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