Other B4xTable Clear

Status
Not open for further replies.

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
When i call clear on an empty b4xTable an error ocurrs:

Error occurred on line: 505 (B4XTable)
java.lang.RuntimeException: Object should first be initialized (B4XView).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:70)
at anywheresoftware.b4a.objects.B4XViewWrapper.getTag(B4XViewWrapper.java:557)
at b4a.example.b4xtable._setpagelabelstate(b4xtable.java:2014)
at b4a.example.b4xtable._clearnavigationstate(b4xtable.java:1940)
at b4a.example.b4xtable$ResumableSub_Clear.resume(b4xtable.java:1867)
at b4a.example.b4xtable._clear(b4xtable.java:1730)
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.debug.Debug.delegate(Debug.java:262)
at b4a.example.grid._initb4xtable(grid.java:92)
at b4a.example.grid._initialize(grid.java:65)
at b4a.example.clsschedule._fillcontents(clsschedule.java:1167)
at b4a.example.clsschedule._fillcmbsubcat(clsschedule.java:1030)
at b4a.example.clsschedule._fillcmbcats(clsschedule.java:1125)
at b4a.example.clsschedule._initialize(clsschedule.java:110)
at b4a.example.clsmenu._clvsub_itemclick(clsmenu.java:220)
at java.lang.reflect.Method.invoke(Native Method)

i had to write it inside a try catch,

another "bug":
if i call again setData on an "empty" table (a table that was prevously loaded with a list of length 0) getRow id's will load a map with null values, despite the b4xtable actually showing information (because the second time i called setData it contained information)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
When i call clear on an empty b4xTable an error ocurrs:
It happens if you call Clear on a non-ready table.
It is fixed for the next update.

if i call again setData on an "empty" table (a table that was prevously loaded with a list of length 0) getRow id's will load a map with null values, despite the b4xtable actually showing information (because the second time i called setData it contained information)
Can you post an example?
 
Upvote 0
Status
Not open for further replies.
Top