B4J Question Problem with AnotherDatePicker

stevetheframe

Member
Licensed User
Longtime User
I'm having a problem with AnotherDatePicker XUI view.
When I try and run the code I get an error.

B4X:
Waiting for debugger to connect...
Program started.
Error occurred on line: 58 (AnotherDatePicker)
java.lang.NullPointerException
    at b4j.example.anotherdatepicker$ResumableSub_DesignerCreateView.resume(anotherdatepicker.java:741)
    at b4j.example.anotherdatepicker._designercreateview(anotherdatepicker.java:687)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
    at anywheresoftware.b4j.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:62)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:93)
    at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:84)
    at anywheresoftware.b4j.objects.TabPaneWrapper.LoadLayout(TabPaneWrapper.java:94)
    at b4j.example.modwt$ResumableSub_Show.resume(modwt.java:140)
    at b4j.example.modwt._show(modwt.java:84)
    at b4j.example.main._tbvjobs_mouseclicked(main.java:2251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Line 57 & 58 in the AnotherDatePicker module are
Dim form As Form = Props.Get("Form")
MainPanel = form.RootPane

The item form is null.

The AnotherDatePicker view is on a second form loaded from the Main form, though I can't see that would make a difference.
I'm doing something wrong, but I've run out of ideas!
 
Top