Guenter Becker Active Member Licensed User Longtime User Mar 11, 2021 #1 Hello, just working with a B4XTable view. I put it in a layout. All works except searching. If I fill the table with data and go into the searchfield to enter text. If I press the first key on the keyboard the message belown is shown. Please help me for solution. Thank you. Error occurred on line: 506 (B4XTable) java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference at TECHDOC.ePilotProf.b4xtable._settexttocell(b4xtable.java:3182) at TECHDOC.ePilotProf.b4xtable$ResumableSub_ImplUpdateDataFromQuery.resume(b4xtable.java:2874) 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:193) at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43) at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1704) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) ** Activity (main) Pause event (activity is not paused). **
Hello, just working with a B4XTable view. I put it in a layout. All works except searching. If I fill the table with data and go into the searchfield to enter text. If I press the first key on the keyboard the message belown is shown. Please help me for solution. Thank you. Error occurred on line: 506 (B4XTable) java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference at TECHDOC.ePilotProf.b4xtable._settexttocell(b4xtable.java:3182) at TECHDOC.ePilotProf.b4xtable$ResumableSub_ImplUpdateDataFromQuery.resume(b4xtable.java:2874) 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:193) at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43) at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1704) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) ** Activity (main) Pause event (activity is not paused). **
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2021 #2 Not a bug. This means that you've inserted nulls in the data.
Guenter Becker Active Member Licensed User Longtime User Mar 12, 2021 #3 Thank you erel, will check if null before populating table cell. In case of null value I transfer "" if text and 0 if it's a number. that works for me.
Thank you erel, will check if null before populating table cell. In case of null value I transfer "" if text and 0 if it's a number. that works for me.