iOS Question Object was not initialized (UIView) BBScrollingLabel

Lucas Eduardo

Active Member
Licensed User
Hello, i can not understand why this happen. I have 3 pages (Main, Cliente, Profissional), in page Profissional i have a BBScrollingLabel customview and works good without problems, but in my page Cliente i put the same code and BBScrollingLabel don't work.
Gives me this error
B4X:
Error occurred on line: 72 (BBScrollingLabel)
Object was not initialized (UIView)
Stack Trace: (
  CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 1227356
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 135616
  topFisio             -[B4IObjectWrapper object] + 136
  topFisio             -[B4XViewWrapper setVisible:] + 44
  topFisio             -[ResumableSub_bbscrollinglabel_AfterTextOrSizeChanged resume::] + 496
  topFisio             -[b4i_bbscrollinglabel _aftertextorsizechanged:] + 404
  topFisio             -[b4i_bbscrollinglabel _base_resize:::] + 880
  CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 1252384
  CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 7472
 topFisio             +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
 topFisio             -[B4IShell runMethod:] + 448
 topFisio             -[B4IShell raiseEventImpl:method:args::] + 1648
 topFisio             -[B4IShellBI raiseEvent:event:params:] + 1580
 topFisio             +[B4IObjectWrapper raiseEvent:::] + 300
 topFisio             __30-[B4IPanelView layoutSubviews]_block_invoke + 900
 libdispatch.dylib    B9D95EAB-9269-367D-B2F4-C2B45821A32D + 374288
 libdispatch.dylib    B9D95EAB-9269-367D-B2F4-C2B45821A32D + 377220
 libdispatch.dylib    B9D95EAB-9269-367D-B2F4-C2B45821A32D + 57744
 CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 693732
 CoreFoundation       7519E999-1053-3367-B9D5-8844F6D3BDC6 + 673240
 CoreFoundation       CFRunLoopRunSpecific + 464
 GraphicsServices     GSEventRunModal + 104
 UIKitCore            UIApplicationMain + 1936
 topFisio             main + 124
 libdyld.dylib        7B531A15-3E73-3185-90E2-B88D9476DA5E + 4960
)

I tryed to do the code again a lot of times, but without success. Could someone help me?

Thank you.
 

Lucas Eduardo

Active Member
Licensed User
Make sure that the text property is set right after you load the layout.
That's my initial code in the page.
B4X:
Page.Initialize("Page")
Page.RootPanel.LoadLayout("visao_cliente")
TextEngine2.Initialize(Page.RootPanel) 'change to Form.RootPane in B4J or Page.RootPanel in B4i
lblNomeUserTopoContaCliente.TextEngine = TextEngine2
lblNomeUserTopoContaCliente.Text = $"."$

I have no idea why this is happening.
 
Upvote 0
Top