Kotlin with fontawesomefx
Issue #47
new
this code in Kotlin
data class ButtonInfo(val texto: String, val icon: GlyphIcon<*>)
val list = listOf(
ButtonInfo("Cadastro", FontAwesomeIconView(FontAwesomeIcon.ADDRESS_BOOK)),
ButtonInfo("Corrida", MaterialDesignIconView(MaterialDesignIcon.RUN)),
ButtonInfo("Classificacao", FontAwesomeIconView(FontAwesomeIcon.LIST)))
list.forEach {
it.icon.size = "3em"
val bt = Button(it.texto, it.icon)
bt.contentDisplay = ContentDisplay.TOP
bt.minWidth = 200.0
root += bt
}
doesn't compile. The error is:
"Type parameter bound for T in var <T : Enum<T!>!> GlyphIcon<T>.size: String! where T : GlyphIcons! is not satisfied: inferred type CapturedTypeConstructor(*) is not a subtype of GlyphIcons!"
Perhaps, can you simplify the GlyphIcon declaration, so that I can use it with kotlin?