Hello guys,
I was working with DatePicker and all was goning well, showing the expected DatePicker.
I don't know what I did, and probably it doesn't make sense, but when I started using XUI Views library, the DatePicker assumed a strange layout, as you can see in the picture:
This strange layout doesn't work, and if I try to choose a month or a year, nothing happens - the objects are frozen. If I click in Ok, I have an error (log):
The code in the line 444 is:
I have tried to disable the XUI Views and forget the itens associated with this library, but after disabled, when I ask the DatePicker, I have another error:
The line 440 is:
And the whole code of asking the DatePicker is:
It's the second time it occours, in the first time I don't know what I have done but returned to normally. Now I can't fix it.
I have already tried to reinstall the app and the bridge, clear the project, I closed all windows of b4i...
Could you help me?
Thanks!
I was working with DatePicker and all was goning well, showing the expected DatePicker.
I don't know what I did, and probably it doesn't make sense, but when I started using XUI Views library, the DatePicker assumed a strange layout, as you can see in the picture:
This strange layout doesn't work, and if I try to choose a month or a year, nothing happens - the objects are frozen. If I click in Ok, I have an error (log):
B4X:
Application_Start
Application_Active
Error occurred on line: 444 (Main)
Expected: UIDatePicker, object type: B4IPanelView
Stack Trace: (
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1227356
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 135616
PainKit Cadastro -[B4IObjectWrapper setObject:] + 276
PainKit Cadastro -[ResumableSub_main_imgCP5_click resume::] + 2296
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1252384
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 7472
PainKit Cadastro +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
PainKit Cadastro -[B4IShell runMethod:] + 448
PainKit Cadastro -[B4IShell raiseEventImpl:method:args::] + 2172
PainKit Cadastro -[B4IShellBI raiseEvent:event:params:] + 1580
PainKit Cadastro -[B4IDelegatableResumableSub resume::] + 380
PainKit Cadastro -[B4I checkAndRunWaitForEvent:event:params:] + 516
PainKit Cadastro -[B4IShellBI raiseEvent:event:params:] + 1436
PainKit Cadastro __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 374288
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 377220
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 57744
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 693732
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 673240
CoreFoundation CFRunLoopRunSpecific + 464
GraphicsServices GSEventRunModal + 104
The code in the line 444 is:
B4X:
Dim dp As DatePicker = p.GetView(0) 'DatePicker is the first view in the layout
I have tried to disable the XUI Views and forget the itens associated with this library, but after disabled, when I ask the DatePicker, I have another error:
B4X:
Application_Start
Application_Active
Error occurred on line: 440 (Main)
Object was not initialized (UIFont)
Stack Trace: (
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1227356
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 135616
PainKit Cadastro -[B4IObjectWrapper object] + 136
PainKit Cadastro +[B4IButtonWrapper build:::] + 1128
PainKit Cadastro +[B4ILayoutBuilder dynamicBuild::::] + 220
PainKit Cadastro -[B4ILayoutBuilder loadLayoutHelper:::::::::::] + 2300
PainKit Cadastro -[B4ILayoutBuilder loadLayoutHelper:::::::::::] + 4696
PainKit Cadastro -[B4ILayoutBuilder loadLayout:::] + 1932
PainKit Cadastro -[B4IPanelWrapper LoadLayout::] + 204
PainKit Cadastro -[ResumableSub_main_imgCP5_click resume::] + 1052
PainKit Cadastro -[b4i_main _imgcp5_click] + 364
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1252384
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 7472
PainKit Cadastro +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
PainKit Cadastro -[B4IShell runMethod:] + 448
PainKit Cadastro -[B4IShell raiseEventImpl:method:args::] + 2172
PainKit Cadastro -[B4IShellBI raiseEvent:event:params:] + 1580
PainKit Cadastro __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 374288
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 377220
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 57744
The line 440 is:
B4X:
p.LoadLayout("DatePicker")
And the whole code of asking the DatePicker is:
B4X:
Sub imgCP5_click
Dim cd As CustomLayoutDialog
Dim p As Panel
p.Initialize("")
p.SetLayoutAnimated(0, 1, 0, 0, Page1.RootPanel.Width - 40dip, 170dip)
p.LoadLayout("DatePicker")
cd.Initialize(p)
Wait For (cd.ShowAsync("Escolha a data de nascimento:", "Ok", "Cancelar", "", False)) Dialog_Result(Result As Int)
If Result = cd.RESULT_POSITIVE Then
Dim dp As DatePicker = p.GetView(0) 'DatePicker is the first view in the layout
'Log($"Selected date: $Date{dp.Ticks}"$)
'Log(DateTime.GetDayOfMonth(dp.Ticks))
If DateTime.GetDayOfMonth(dp.Ticks) < 10 Then
dnasc = "0" & DateTime.GetDayOfMonth(dp.Ticks)
Else
dnasc = DateTime.GetDayOfMonth(dp.Ticks)
End If
If DateTime.GetMonth(dp.Ticks) < 10 Then
mnasc = "0" & DateTime.GetMonth(dp.Ticks)
Else
mnasc = DateTime.GetMonth(dp.Ticks)
End If
anasc = DateTime.Getyear(dp.Ticks)
lblCP1.Text = dnasc & "/" & mnasc & "/" & anasc
End If
End Sub
It's the second time it occours, in the first time I don't know what I have done but returned to normally. Now I can't fix it.
I have already tried to reinstall the app and the bridge, clear the project, I closed all windows of b4i...
Could you help me?
Thanks!
Last edited: