iOS Question Error Cannot parse

gerredtor

Active Member
Licensed User
Hello i becomes an error with the CustomListView:

B4X:
Sub downloadcenterItemDownloading(trackID As String) As Panel
    Dim p2 As Panel
    p2.Initialize("")
   
    Dim iv As ImageView
    iv.Initialize("")
    iv.Bitmap = LoadBitmap(File.DirAssets, "trashcan_h.png")
    iv.Height = 40
    iv.Width = 40
    iv.Tag = trackID
   
    Dim iv2 As ImageView
    Dim CanvasGraph As Canvas
    iv2.Initialize("")
    CanvasGraph.Initialize(iv2)
    CanvasGraph.DrawColor(Colors.Black)
    CanvasGraph.DrawLine(5,0,g_width-10,0,Colors.Black,1)
    CanvasGraph.Refresh   
   
    Dim l As Label
    l.Initialize("")
    l.Text = sql.my_sql_load_wert("tracks-translations", "trackID", trackID, "titel", "AND `speakID`='"& speak &"'")
    l.TextAlignment = l.ALIGNMENT_CENTER
    l.Multiline = True
    l.Font = Font.CreateNew(15)
   
    p2.Tag = trackID
    p2.Height = 110
   
    p2.Width = g_width

    p2.SetBorder(1,Colors.Black,0)

    p2.AddView(iv2,0, 50, g_width, 10)
    p2.AddView(l,0,0,g_width-40,50)
    p2.AddView(iv,l.Width,5,40,40)
   
    Return p2
End Sub

Sub setupDownloadcenter   
    clv1.GetBase.Visible = False   
    clv2.GetBase.Visible = True
           
    clv2.GetBase.Width = g_width
    clv2.GetBase.Height = clv1.GetBase.Height 'Ändern!!
    clv2.GetBase.Color = Colors.Transparent
    clv2.GetBase.TintColor = Colors.Transparent
   
    clv2.Add(downloadcenterItemDownloading("11"),downloadcenterItemDownloading("11"),downloadcenterItemDownloading("11"))

End Sub

and the error

B4X:
Error occurred on line: 1030 (Main)
Cannot parse: <B4IPanelWrapper: <B4IPanelView: 0x15612f50; frame = (0 0; 320 110); clipsToBounds = YES; layer = <CALayer: 0x15613030>>>
Stack Trace: (
  CoreFoundation       <redacted> + 150
  libobjc.A.dylib      objc_exception_throw + 38
  CoreFoundation       <redacted> + 0
  Lulaj                -[B4I ObjectToNumber:] + 540
  Lulaj                -[B4IRDebugUtils numberCast::] + 270
  CoreFoundation       <redacted> + 68
  CoreFoundation       <redacted> + 292
  Lulaj                +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1786
  Lulaj                -[B4IShell runMethod:] + 574
  Lulaj                -[B4IShell raiseEventImpl:method:args::] + 1998
Lulaj                -[B4IShellBI raiseEvent:event:params:] + 1442
Lulaj                +[B4IDebug delegate:::] + 52
Lulaj                -[b4i_main _setupdownloadcenter] + 360
Lulaj                -[b4i_main _l5_dropdown_click] + 706
CoreFoundation       <redacted> + 68
CoreFoundation       <redacted> + 292
Lulaj                +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1786
Lulaj                -[B4IShell runMethod:] + 574
Lulaj                -[B4IShell raiseEventImpl:method:args::] + 2212
Lulaj                -[B4IShellBI raiseEvent:event:params:] + 1442
Lulaj                __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
libdispatch.dylib    <redacted> + 10
libdispatch.dylib    <redacted> + 22
libdispatch.dylib    _dispatch_main_queue_callback_4CF + 1532
CoreFoundation       <redacted> + 8
CoreFoundation       <redacted> + 1590
CoreFoundation       CFRunLoopRunSpecific + 516
CoreFoundation       CFRunLoopRunInMode + 108
GraphicsServices     GSEventRunModal + 160
UIKit                UIApplicationMain + 144
Lulaj                main + 108
libdyld.dylib        <redacted> + 2
)
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

this line is the problem:
B4X:
clv2.Add(downloadcenterItemDownloading("11"),downloadcenterItemDownloading("11"),downloadcenterItemDownloading("11"))
The second and third parameter is wrong.

Jan
 
Upvote 0

gerredtor

Active Member
Licensed User
ah yes

B4X:
clv2.Add(downloadcenterItemDownloading("11"),downloadcenterItemDownloading("11").Height,downloadcenterItemDownloading("11").tag)

this is right.
 
Upvote 0
Top