hi all
this sub produced an error in b4j 8.10 but was working fine in 8
B4X:
private Sub SetupTables(tbl As B4XTable, columns() As String, colwidths() As Double,w As Int)
Dim cols(columns.Length) As B4XTableColumn
tbl.Clear
For i = 0 To columns.Length-1
cols(i) = tbl.AddColumn(columns(i),tbl.COLUMN_TYPE_TEXT)
If colwidths <> Null Then
cols(i).Width=colwidths(i) *(w-100)
Else
cols(i).Width=100
End If
Next
End Sub
Error :
Error occurred on line: 505 (B4XTable)
java.lang.RuntimeException: Object should first be initialized (B4XView).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32)
at anywheresoftware.b4a.objects.B4XViewWrapper.getNodeObject(B4XViewWrapper.java:103)
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:99)
at anywheresoftware.b4a.objects.B4XViewWrapper.getTag(B4XViewWrapper.java:671)
at b4j.example.b4xtable._setpagelabelstate(b4xtable.java:2001)
at b4j.example.b4xtable._clearnavigationstate(b4xtable.java:1927)
at b4j.example.b4xtable$ResumableSub_Clear.resume(b4xtable.java:470)
at b4j.example.b4xtable._clear(b4xtable.java:333)
at b4j.example.tables._setuptables(tables.java:676)
at b4j.example.tables._pan(tables.java:86)
at b4j.example.main$ResumableSub_FillTableStatsNew.resume(main.java:4496)
at b4j.example.main._filltablestatsnew(main.java:2835)
at b4j.example.main$ResumableSub_BtnsStatsX_Click.resume(main.java:2648)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:42)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:136)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:85)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:487)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:467)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:541)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)