dr.fornax
09/08/2017, 7:29 PMdr.fornax
09/08/2017, 7:30 PMtieskedh
09/08/2017, 7:31 PMtieskedh
09/08/2017, 7:34 PMdr.fornax
09/08/2017, 7:35 PMdr.fornax
09/08/2017, 7:36 PMcarlw
09/08/2017, 8:11 PMedvin
09/08/2017, 8:30 PMedvin
09/08/2017, 8:31 PMfun VBox.threeLabels
. This doesn't really belong in the TornadoFX tutorial, it's more "Extension Functions 101" I think. Shameless plug: I've covered this in Part 1 of my video tutorial on Kotlin 🙂dr.fornax
09/08/2017, 8:56 PMdr.fornax
09/08/2017, 9:01 PMdr.fornax
09/08/2017, 9:52 PMdr.fornax
09/08/2017, 9:54 PMdr.fornax
09/08/2017, 9:56 PMdr.fornax
09/08/2017, 9:59 PMdr.fornax
09/08/2017, 9:59 PMedvin
09/08/2017, 10:14 PMedvin
09/08/2017, 10:15 PMkristofdho
09/09/2017, 10:56 AMfun <T> box(all: T) = CssBox(all, all, all, all)
fun <T> box(vertical: T, horizontal: T) = CssBox(vertical, horizontal, vertical, horizontal)
fun <T> box(top: T, right: T, bottom: T, left: T) = CssBox(top, right, bottom, left)
data class CssBox<out T>(val top: T, val right: T, val bottom: T, val left: T)
I noticed in the 2 argument box that the naming of the arguments is wrong, when assuming the same behaviour as normal css it works, but when using named parameters horizontal
and vertical
should be switched.dr.fornax
09/09/2017, 12:33 PMdr.fornax
09/09/2017, 12:33 PMedvin
09/09/2017, 1:27 PMedvin
09/09/2017, 1:27 PMedvin
09/09/2017, 1:27 PMcarlw
09/09/2017, 1:47 PMedvin
09/09/2017, 1:49 PMdr.fornax
09/09/2017, 1:49 PMcarlw
09/09/2017, 1:51 PMcarlw
09/09/2017, 1:51 PMedvin
09/09/2017, 1:52 PM