B4J Question Java 11+B4J v6.80 BETA #1 : Object has to be initialized, even if it was added with the designer.

IndieDev

Active Member
Licensed User
Hi,
All objects added using the designer are now required to be initialized, else displays errors like these:
Waiting for debugger to connect...
Program started.
Error occurred on line: 83 (Main)
java.lang.RuntimeException: Object should first be initialized (RadioButton).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32)
at anywheresoftware.b4j.objects.NodeWrapper$ControlWrapper.setTooltipText(NodeWrapper.java:961)
at pk.x264.main._appstart(main.java:186)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:627)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:236)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at pk.x264.main.start(main.java:38)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)

After initializing the object(s) and Compile & Run. It just displays a blank window.
Source code attached.

Request help, please.
 

Attachments

  • pkX264.zip
    133.7 KB · Views: 306

Erel

B4X founder
Staff member
Licensed User
Longtime User
All objects added using the designer are now required to be initialized, else displays errors like these
This is of course not correct.

The errors have nothing to do with the beta version. Please edit the thread title.

Your code is still wrong. You should learn how to use the debugger: https://b4x.com/etp.html

You will immediately see that the layout is never loaded.

test.gif
 
Upvote 0

IndieDev

Active Member
Licensed User
Hi,

Thanks for the reply.

Few questions...
1. How do I edit the Thread Title? (Couldn't find option to do so)
2. How did you get the window which displays (Mainform, Stage, Scene, Pane) and how does it help?

I've got the form to display now, with your coaxing. Thanks :)
And it no longer requires the initializing....

Attaching the new code.
Please check if its fine now. (Newbie to B4J... request)
 

Attachments

  • pkX264.zip
    133.7 KB · Views: 330
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
How do I edit the Thread Title? (Couldn't find option to do so)
There is a small Thread Tools link in the top right corner.

2. How did you get the window which displays (Mainform, Stage, Scene, Pane) and how does it help?
Everything that you need is available in the video tutorials and in the programming guides.

Please check if its fine now. (Newbie to B4J... request)
I'm sorry but it doesn't work like this.
 
Upvote 0

IndieDev

Active Member
Licensed User
Had seen the Thread Tools option earlier, but this is all it displays...
 

Attachments

  • Screenshot (56).png
    Screenshot (56).png
    6.6 KB · Views: 285
Upvote 0
Top