B4J Question java.lang.RuntimeException: Object should first be initialized (AnchorPane).

FranckB

Member
Licensed User
Longtime User
Hi all,

B4X:
Program started.
main._appstart (java line: 135)
java.lang.RuntimeException: Object should first be initialized (AnchorPane).
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:28)
    at anywheresoftware.b4j.objects.NodeWrapper.setVisible(NodeWrapper.java:182)
    at FB.Urne_GT.main._appstart(main.java:135)
    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:483)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at FB.Urne_GT.main.start(main.java:37)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
    at com.sun.javafx.application.LauncherImpl$$Lambda$51/31040562.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
    at com.sun.javafx.application.PlatformImpl$$Lambda$44/7100574.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
    at com.sun.javafx.application.PlatformImpl$$Lambda$47/1593319.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
    at com.sun.javafx.application.PlatformImpl$$Lambda$45/7135120.run(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
    at com.sun.glass.ui.win.WinApplication$$Lambda$37/24247422.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

I have made some changes in a designer layout and i have this error when i try to compile.
The appli work fine before...
I don't understand what is the problem. Any Idea ?

Thank's by advance for your help
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

to check - have you added any new or renamed controls to the B4J code?
An error message like
B4X:
Object should first be initialized (AnchorPane)
is typically a sign that a control declaration is missing.
 
Upvote 0

FranckB

Member
Licensed User
Longtime User
Thank's Rob,

I delete the anchorPanel from the layout but the control is already declared in the globlals as
"Private admin_panel As AnchorPane"

As soon as i recreate this control, all is ok.

Sorry for my poor english
 
Upvote 0
Top