B4J Question Forms Builder Obsolete?

Jim McDougal

Member
Licensed User
I'm trying to run Forms Builder in B4J with Java\jdk-11.0.1\bin\javac.exe and I get the following error response:

Main - 67: Undeclared variable 'r' is used before it was assigned any value.
Main - 66: Undeclared variable 'r' is used before it was assigned any value.
Main - 65: Unknown type: reflector
Are you missing a library reference?

And the error in:

Sub AddKeyPressedListener
Dim r As Reflector
r.Target = MainForm.RootPane
r.AddEventHandler("keypressed", "javafx.scene.input.KeyEvent.KEY_PRESSED")
End Sub

Any thoughts on what might be causing this? Both B4J and Forms Builder are new downloads.

I posted this to an old thread (mea culpa) and was advised that Forms Builder was deprecated years ago, however it is the tool demonstrated in the Forms and User Input video tutorial and the Forms Builder source code is only dated Sep 2019 (perhaps that is old, I don't know). :confused:
 

DonManfred

Expert
Licensed User
Longtime User
You are talking about
[B4X] Forms Builder
? This one is not deprecated.

The deprecated one is FXSceneBuilder

Sorry, i did interpret your other post wrong.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Just to clarify (I haven’t seen your other post). Are you talking about the forms builder in the pint 1?

 
Upvote 0

Jim McDougal

Member
Licensed User
Yes, the Forms Builder used with B4XPreferencesDialog.

My other post is identical to the one beginning this thread:

I'm trying to run Forms Builder in B4J with Java\jdk-11.0.1\bin\javac.exe and I get the following error response:

Main - 67: Undeclared variable 'r' is used before it was assigned any value.

Main - 66: Undeclared variable 'r' is used before it was assigned any value.
Main - 65: Unknown type: reflector
Are you missing a library reference?


And the error is in:

Sub AddKeyPressedListener
Dim r As Reflector
r.Target = MainForm.RootPane
r.AddEventHandler("keypressed", "javafx.scene.input.KeyEvent.KEY_PRESSED")

End Sub

Any thoughts on what might be causing this? Both B4J and Forms Builder are new downloads.


And here's the compile error:

B4J Version: 8.90
Parsing code. Error
Error parsing program.
Error description: Unknown type: reflector
Are you missing a library reference?
Error occurred on line: 65 (Main)

Dim r As Reflector

Thanks.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It looks like you haven't downloaded the reflection library. Download the file from the first post in the link, unzip it and copy the jar and xml to your additional libraries folder.
 
Upvote 0
Top