Hi
I was working my project on B4XTable version 1.17 and after updated to 1.21
when I try to run my application I get error on line 148 saying
The code gives me the error is
Why?
The first column of the table has 3 buttons and I change the type of column as
Also I exclude empty values fields from the Data collection .
I was working my project on B4XTable version 1.17 and after updated to 1.21
when I try to run my application I get error on line 148 saying
** Activity (esfiitems) Resume **
true
** Activity (esfiitems) Pause, UserClosed = true **
** Activity (document) Resume **
Error occurred on line: 148 (Document)
java.lang.RuntimeException: Object should first be initialized (View).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.B4XViewWrapper.GetView(B4XViewWrapper.java:299)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1083)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1030)
at gr.iosif.droidview.b4xtable$ResumableSub_ImplUpdateDataFromQuery.resume(b4xtable.java:3243)
at gr.iosif.droidview.b4xtable._implupdatedatafromquery(b4xtable.java:2744)
at gr.iosif.droidview.b4xtable._updatedata(b4xtable.java:2302)
at gr.iosif.droidview.b4xtable._refresh2(b4xtable.java:1078)
at gr.iosif.droidview.b4xtable._refreshnow(b4xtable.java:3589)
at gr.iosif.droidview.b4xtable$ResumableSub_SetData.resume(b4xtable.java:481)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
The code gives me the error is
B4X:
Public Sub B4XTable1_DataUpdated
If Main.G1.EditOrder = False Then
For i = 0 To B4XTable1.VisibleRowIds.Size - 1
Dim p As B4XView
p = G5.editCol.CellsLayouts.Get(i + 1)
p.GetView(1).Visible = B4XTable1.VisibleRowIds.Get(i) > 0 --->>> Line 148
p.GetView(2).Visible = p.GetView(1).Visible
p.GetView(3).Visible = p.GetView(1).Visible
Next
End If
Dim rs As ResultSet = B4XTable1.sql1.ExecQuery("Select SUM(c12) as SC12, SUM(c14) as SC14 From Data")
If rs.NextRow Then
KathariAxiaTxt.Text = NumberFormat2(rs.GetDouble("SC12"), 1, 2, 2, False)
FPATxt.Text = NumberFormat2(rs.GetDouble("SC14"), 1, 2, 2, False)
TotalTxt.Text = NumberFormat2(rs.GetDouble("SC12") + rs.GetDouble("SC14"), 1, 2, 2, False)
End If
rs.Close
End Sub
Why?
The first column of the table has 3 buttons and I change the type of column as
B4X:
editCol = B4XTable11.AddColumn("Επεξεργασία", B4XTable11.COLUMN_TYPE_VOID)