B4J Question AS RatingBar using Sender in a CustomListView Error

Peter Lewis

Active Member
Licensed User
Longtime User
Hi
I am trying to get the Index from a custom list view of this great RatingBar Lib.
To Do this I have included this code

B4X:
Dim index As Int = clvViewContainers.GetItemFromView(Sender)

Which works perfectly on the checkbox on CustomListView

This code is now under the Sub ASRatingBar1_RatingChange(rating As Int)
I am getting this error.
Any Ideas of how to solve it ?

Thank you

java.lang.ClassCastException: class b4j.example.asratingbar cannot be cast to class javafx.scene.Node (b4j.example.asratingbar is in unnamed module of loader 'app'; javafx.scene.Node is in module javafx.graphics of loader 'app')
 

Peter Lewis

Active Member
Licensed User
Longtime User
1725138930468.png
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Is it possible to use your own images or can we only use FontAwesome ?
You can use your own images, the parameter type is B4XBitmap. The "FontToBitmap" function, just convert a font awesome or material icon to an image, this saves me having to include my own pictures in the example project.

Thank you very much! :)
 
Upvote 0
Top