You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
This title probably isn't clear enough, so here is the code that is problematic
function myFunction = {
label("My label is awesome!")
label(someIcon) # note : someIcon oftype javax.swing.Icon == true
}
function label = |textOrIcon| {
return javax.swing.JLabel(textOrIcon)
}
The second use of label yields a ClassCastException : java.lang.ClassCastException: Cannot cast javax.swing.Icon to java.lang.String
If reversed (i.e we use label(someIcon) first), this also yields a ClassCastException, except that it's the other way around : java.lang.ClassCastException: Cannot cast java.lang.String to javax.swing.Icon
This shouldn't happen : the JLabel class has two constructors : JLabel(String) and JLabel(Icon). One would except Golo to be able to dynamically call either of the two depending on the object we give.
The text was updated successfully, but these errors were encountered:
This title probably isn't clear enough, so here is the code that is problematic
The second use of label yields a ClassCastException :
java.lang.ClassCastException: Cannot cast javax.swing.Icon to java.lang.String
If reversed (i.e we use
label(someIcon)
first), this also yields a ClassCastException, except that it's the other way around :java.lang.ClassCastException: Cannot cast java.lang.String to javax.swing.Icon
This shouldn't happen : the JLabel class has two constructors : JLabel(String) and JLabel(Icon). One would except Golo to be able to dynamically call either of the two depending on the object we give.
The text was updated successfully, but these errors were encountered: