B4J Question [B4XView] Slider Cast Exception

rwblinn

Well-Known Member
Licensed User
Longtime User
In a B4J (v9.10, JDK 11) UI Project, created a Slider as B4XView (via designer Add View > Slider).

When accessing the slider property progress a cast exception occurs:

B4X:
Log($"Slider Value: ${Slider1.Progress}"$)

C++:
java.lang.ClassCastException: class javafx.scene.control.Slider cannot be cast to class javafx.scene.control.ProgressIndicator (javafx.scene.control.Slider and javafx.scene.control.ProgressIndicator are in module javafx.controls of loader 'app'), StackTrace: java.lang.ClassCastException: class javafx.scene.control.Slider cannot be cast to class javafx.scene.control.ProgressIndicator (javafx.scene.control.Slider and javafx.scene.control.ProgressIndicator are in module javafx.controls of loader 'app')

Q: How to get the slider progress (or value)?
 

Attachments

  • TestSliderBX4.zip
    2.2 KB · Views: 212
Cookies are required to use this site. You must accept them to continue using the site. Learn more…