Using the class InlineEditing for B4XTable in B4A I get this error: Error occurred on line: 61 (InlineEditing)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
Error occurred on line: 61 (InlineEditing)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
at b4a.example.inlineediting$ResumableSub_SetEditableControlLayout.resume(inlineediting.java:352)
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: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.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:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
but only in B4A, the B4J version (it is a B4XPages project) everything works fine.
Setting a breakpoint before and then continuing execution by pressing F5, the exception is not raised; for this reason I tried to insert a Sleep (100) but without success.
P.S. Same B4XMainPage, of course, in B4A and B4J and all views declared as B4XView (except the B4XTable)
I'm attaching a more simple test B4XPages project.
This one does not use MySql nor PHP but a Map of "records" created at runtime (this was not the purpose of the project but serves to be able to try to find the bug).
Like the other, B4J does not give problems, B4A throws the exception in the InlineEditing class (see post #1).
This will never enter my head, also because there is no more space ? Perhaps also because I have not read very well the thread in which it was discussed.
New warning:
"Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)"
This will never enter my head, also because there is no more space ? Perhaps also because I have not read very well the thread in which it was discussed.
I tried your sample. Why did you declare this thread 'Solved'. Try to edit a cell, then click to edit another cell, the first change does not persist and the table locks up.
Yes, I know the purpose is to identify the crash, but the example code you posted does not work even after making the correction to the class module that Erel pointed out to you. Try to test it for yourself..
Yes, I know the purpose is to identify the crash, but the example code you posted does not work even after making the correction to the class module that Erel pointed out to you. Try to test it for yourself..
Well, it was just a test. I could try to fix that bug but for the moment it's not worth.
It would be necessary to somehow detect the "lost focus" (but if the cell does not contain an EditText this is difficult; indeed, it would be even if it were an EditText) and manage the software keyboard (B4A).