B4J Question rasperry and jFxExtraGauges

Hagen Schloemer

Member
Licensed User
Longtime User
Hello!

is ist possible to user a rasperry and jfxextragauges? my little test-project includes a snipped from the demo project, but the rasperry shows "Parent event already exists".

LCD.Initialize("LCD")
MainForm.RootPane.AddNode(LCD, 160, 250, 250, 75)
LCD.LcdMaxMeasuredValueVisible = True
LCD.LcdMinMeasuredValueVisible = True
LCD.BargraphVisible = True
LCD.ValueAnimationEnabled = False

thanks in advance
hagen
 

Hagen Schloemer

Member
Licensed User
Longtime User
Hi Erel!

I have started in a terminal session, ( i know that cannot be functional, but the error-message is the same....;-)

main._appstart (java line: 57)
java.lang.IllegalArgumentException: EventType "javafx.event.EventType@12dd5f2"with parent "EVENT" already exists


Where is the b4j-bridge? i know only the the b4a bridge from android devices....

best regards
hagen
 
Upvote 0

Hagen Schloemer

Member
Licensed User
Longtime User
Hi Erel!

Here is the complete log:

Program started.
Error occurred on line: 15 (main).
java.lang.IllegalArgumentException: EventType "javafx.event.EventType@e8716"with parent "EVENT" already exists
at javafx.event.EventType.register(EventType.java:186)
at javafx.event.EventType.<init>(EventType.java:128)
at javafx.event.EventType.<init>(EventType.java:83)
at jfxtras.labs.scene.control.gauge.GaugeModel$GaugeModelEvent.<init>(GaugeModel.java:760)
at jfxtras.labs.scene.control.gauge.GaugeModel.fireGaugeModelEvent(GaugeModel.java:159)
at jfxtras.labs.scene.control.gauge.GaugeModel.setThreshold(GaugeModel.java:333)
at jfxtras.labs.scene.control.gauge.Gauge.setThreshold(Gauge.java:633)
at anywheresoftware.b4j.agraham.jfxtrascontrols.BatteryWrapper$LcdWrapper.innerInitialize(BatteryWrapper.java:566)
at anywheresoftware.b4j.objects.NodeWrapper.Initialize(NodeWrapper.java:45)
at b4j.example.main._appstart(main.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMetho
dAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:558)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:224)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
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.ShellBA.raiseEvent2(ShellBA.java:82)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:35)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)

at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:860)
at com.sun.glass.ui.lens.LensApplication.access$1800(LensApplication.java:58)
at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:917)
at java.lang.Thread.run(Thread.java:744)


The very simple Test-Program is here:

Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private LCD As JFXtrasLCD
End Sub

Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout2") 'Load the layout file.
LCD.Initialize("LCD")
MainForm.RootPane.AddNode(LCD, 160, 250, 250, 75)
LCD.LcdDesign = "RED"
LCD.LcdMaxMeasuredValueVisible = True
LCD.LcdMinMeasuredValueVisible = True
LCD.BargraphVisible = True
LCD.ValueAnimationEnabled = False

MainForm.Show
End Sub


best regards
Hagen
 
Upvote 0
Top