Hi,
I am putting code from my application in B4a to B4i.
Using the same code, put an image on the header of a table, I have this error when displaying the table ( error on line iv.SetBitmap(t) )
Thanks for your help.
Error occurred on line: 1610 (B4XMainPage)
Type does not match (UILabel)
Stack Trace: (
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 40128
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 1012260
LYZO -[B4XViewWrapper throwTypeDoesNotMatch] + 96
LYZO -[B4XViewWrapper SetBitmap:] + 212
LYZO -[b4i_b4xmainpage _setheaderimagestat::] + 1116
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 470020
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 134324
LYZO +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1296
LYZO -[B4IShell runMethod:] + 420
LYZO -[B4IShell raiseEventImpl:method:args::] + 1472
LYZO -[B4IShellBI raiseEvent:eventarams:] + 1360
LYZO -[B4IDebugResumableSub resume::] + 352
LYZO __21-[B4ICommon Sleep:::]_block_invoke + 48
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 8992
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 16044
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 75428
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 625704
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 501088
CoreFoundation CFRunLoopRunSpecific + 612
GraphicsServices GSEventRunModal + 164
UIKitCore B3834960-244B-34E4-9EA0-CA4BB44EF0F3 + 3790568
UIKitCore UIApplicationMain + 340
LYZO main + 100
dyld 6987370A-C385-3135-A27F-6731706BCBD8 + 89580
)
I am putting code from my application in B4a to B4i.
Using the same code, put an image on the header of a table, I have this error when displaying the table ( error on line iv.SetBitmap(t) )
Thanks for your help.
Error occurred on line: 1610 (B4XMainPage)
Type does not match (UILabel)
Stack Trace: (
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 40128
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 1012260
LYZO -[B4XViewWrapper throwTypeDoesNotMatch] + 96
LYZO -[B4XViewWrapper SetBitmap:] + 212
LYZO -[b4i_b4xmainpage _setheaderimagestat::] + 1116
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 470020
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 134324
LYZO +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1296
LYZO -[B4IShell runMethod:] + 420
LYZO -[B4IShell raiseEventImpl:method:args::] + 1472
LYZO -[B4IShellBI raiseEvent:eventarams:] + 1360
LYZO -[B4IDebugResumableSub resume::] + 352
LYZO __21-[B4ICommon Sleep:::]_block_invoke + 48
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 8992
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 16044
libdispatch.dylib BB347F0E-F21C-3607-82E6-C8D750FDBF8C + 75428
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 625704
CoreFoundation 4230C122-42E8-383B-BEEC-EE7B61F8BB61 + 501088
CoreFoundation CFRunLoopRunSpecific + 612
GraphicsServices GSEventRunModal + 164
UIKitCore B3834960-244B-34E4-9EA0-CA4BB44EF0F3 + 3790568
UIKitCore UIApplicationMain + 340
LYZO main + 100
dyld 6987370A-C385-3135-A27F-6731706BCBD8 + 89580
)
B4X:
Sub SetHeaderImageStat (Index As Int)
Dim c As B4XTableColumn = TabStat.Columns.Get(Index)
Dim p As B4XView = c.CellsLayouts.Get(0)
Dim iv As B4XView = p.GetView(0)
Dim t As B4XBitmap
t=xui.LoadBitmapResize(File.DirAssets, "jauneorange.png", 200, 200, True)
iv.SetBitmap(t)
End Sub