borboss
08/01/2017, 2:47 PMedvin
08/01/2017, 3:00 PMNodes.kt
perhaps? It's easy to move without ramifications if a better place shows up later!Ruckus
08/01/2017, 3:05 PMnimakro
08/01/2017, 3:56 PMRuckus
08/01/2017, 4:05 PMladder
and derive
functions (https://github.com/edvin/tornadofx/issues/220), but I never got around to finishing it. I'm still not sure what a good solution for its problems would be.
In the meantime, you can just use an unsafe/raw call and give it the string. Sadly that's the best I have for you.Ruckus
08/01/2017, 4:10 PMunsafe("-fx-shadow-highlight-color", raw("""
ladder(
-fx-background,
transparent 0%,
derive(-fx-background,40%) 5%,
derive(-fx-background,60%) 70%,
derive(-fx-background,100%) 85%,
derive(-fx-background,100%) 97%,
derive(-fx-background,-10%) 97.5%
)
""".trim().replace(Regex("\\s+"), " ")))
eddy_wm
08/01/2017, 5:20 PMedvin
08/01/2017, 5:50 PMeddy_wm
08/01/2017, 6:02 PMedvin
08/01/2017, 6:07 PMArrival
object that also supports JSON, this can be automatically loaded with arrival = jsonModel("arrival")
.edvin
08/01/2017, 6:13 PMedvin
08/01/2017, 6:24 PMedvin
08/01/2017, 6:24 PMedvin
08/01/2017, 6:24 PMedvin
08/01/2017, 6:25 PMjsonModel
function makes your code incredibly clean and nice. In fact, this is all you need in Flight
to parse that JSON blob:edvin
08/01/2017, 6:27 PMTimeInfo
for Arrival
and Departure
, since they contain the same fields. Notice how the timestamp is turned into a LocalDateTime
object by getting the string and parsing it using a formatter defined in the companion object.eddy_wm
08/01/2017, 6:48 PMeddy_wm
08/01/2017, 6:53 PMedvin
08/01/2017, 7:03 PMcarlw
08/01/2017, 7:14 PMcarlw
08/01/2017, 7:14 PMcarlw
08/01/2017, 7:14 PMcarlw
08/01/2017, 7:15 PMeddy_wm
08/01/2017, 7:20 PMapi.baseURI = "<http://127.0.0.1:8000/api/v1/>" val params = mapOf("include" to "departure,arrival")
and finally api.get("flights${params.queryString}")
. At the end I may not be quite sure whether I built the correct URL, that was my concern. Nevertheless, I am very thankful @edvin.carlw
08/01/2017, 7:20 PMcarlw
08/01/2017, 7:22 PMedvin
08/01/2017, 7:46 PMedvin
08/01/2017, 7:46 PMeddy_wm
08/01/2017, 7:56 PM