Hello,
I'm getting a strange exception at customlistview module, InsertAt sub, at this line:
The error is the following:
I've defined that error as "strange" because it is only raised when the app executes "normally". If I put a breakpoint before the InsertAt method is called, the execution pauses and then I continue it manually, there is no exception and the customlistview loads fine.
I've checked that in:
Value As Object is not null, and that Pnl is also initialized.
I've tried loading the customlistview from Activity_Create and from Activity_Resume, with the same result.
Thank you very much!
I'm getting a strange exception at customlistview module, InsertAt sub, at this line:
B4X:
p.AddView(Pnl, 0, 0, sv.Width, ItemHeight)
The error is the following:
Error occurred on line: 181 (CustomListView)
java.lang.NullPointerException
at anywheresoftware.b4a.objects.ViewWrapper.getWidth(ViewWrapper.java:140)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at eitorteam.privapp.main.afterFirstLayout(main.java:108)
at eitorteam.privapp.main.access$000(main.java:17)
at eitorteam.privapp.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
at anywheresoftware.b4a.objects.ViewWrapper.getWidth(ViewWrapper.java:140)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at eitorteam.privapp.main.afterFirstLayout(main.java:108)
at eitorteam.privapp.main.access$000(main.java:17)
at eitorteam.privapp.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)
I've defined that error as "strange" because it is only raised when the app executes "normally". If I put a breakpoint before the InsertAt method is called, the execution pauses and then I continue it manually, there is no exception and the customlistview loads fine.
I've checked that in:
B4X:
Public Sub InsertAt(Index As Int, Pnl As Panel, ItemHeight As Int, Value As Object)
Value As Object is not null, and that Pnl is also initialized.
I've tried loading the customlistview from Activity_Create and from Activity_Resume, with the same result.
Thank you very much!