https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
tornadofx
  • g

    gtnarg

    10/17/2018, 5:07 PM
    @edvin - I thought there was a jpro defect you were waiting on a fix for - did that ever get resolved?
    c
    • 2
    • 1
  • h

    hudsonb

    10/17/2018, 5:11 PM
    How does this work (lambda after the
    String
    ):
    range {
        "age" {
            from = 10
            to = 20
        }
    }
    That "age" block is somehow creating a
    RangeBlock.RangeData
    instance.
    • 1
    • 1
  • t

    thlinde

    10/20/2018, 2:25 PM
    @carlw He Carl. Your reaction time is so short and it works. Great. Thanks again. In Edvin's css file for ListMenu I found label using textfill (tornadofx/src/main/resources/tornadofx/listmenu.css), but this doesn't work in translation to typesafe css. Maybe I don't understand it in the right way.
    c
    • 2
    • 1
  • s

    Spike Baylor

    10/22/2018, 11:00 PM
    in particular, none of this is a javafx aware model. I assume i'll want to sort of make similar replica using javafx properties to use as the view model and have that all hook up? I think probably know where to go with it, I was just wondering if anyone had any good examples where the structure and data changed somewhat often
    v
    • 2
    • 10
  • a

    Anders

    10/23/2018, 6:31 AM
    What is the correct way of adding views to a vbox-view? I have this code, that works, but it doesn't feel like it's the best way to do it? import tornadofx.*
    -.kt
    g
    • 2
    • 3
  • v

    ValV

    10/23/2018, 7:15 AM
    vbox {
      add(SubViewA::class)
      add(SubViewB::class)
      add(SubViewC::class)
      add(SubViewD::class)
    }
    Assuming
    SubViewX
    is a
    Fragment
    👍 1
    a
    e
    • 3
    • 13
  • t

    thomasnield

    10/23/2018, 10:17 PM
    10K views in three days. That is the power of a buzzword I guess. Just use the words "neural network" and people travel from near and far.
    😉 1
    ➕ 1
    v
    • 2
    • 8
  • s

    sp33dy

    10/25/2018, 8:39 AM
    Hi all, I'm using Eclipse with the Kotlin plugin. I've just opened up my workspace after a days inactivity and now get this on every .kt file I open:
    o
    • 2
    • 1
  • s

    sp33dy

    10/25/2018, 1:59 PM
    does anyone have a reference they could point me to for loading a json file (rather than url). I've found the documentation that shows me the different load methods, but I can't figure out how to work it. Continuing my quest, but wondered if there was such an article or such like?
    h
    • 2
    • 3
  • s

    sp33dy

    10/26/2018, 12:10 PM
    another question for you? I've just got form validators working. 🙂 yet another surprise on how easy and useful. Is there a way to force the cursor to the first error field? I'm validating on each field entry but also on button click. After button click, if invalid, I would like to move the cursor to the first error
    g
    • 2
    • 1
  • s

    Shan

    10/26/2018, 4:51 PM
    Hello again all. Hope everyone is having a good day today! I'm getting into the styling of my application and have been messing around with the idea of a default "theme" that I would override when necessary rather than what I would normally do for a web application (which is to say, just add css classes to elements as I make them). I was wondering if anyone has made a theme (in the traditional javafx sense, I guess just something that encompasses all possible widgets) with the TornadoFX type-safe css builders, and if so if there is like, a template somewhere that I can use as a starting point? Or more broadly, maybe: what is the best practice for styling an application?
    r
    a
    n
    • 4
    • 4
  • c

    carlw

    10/29/2018, 12:42 AM
    This article has a little on MVVM which I've used in the C# world. I've maintained a few plain JavaFX apps and they suffer from what I call "fat controller syndrome" where the controllers become coupled to both the view and the model, breaking any semblance of encapsulation. https://courses.bekwam.net/public_tutorials/bkcourse_tornadofx_mvvm.html My designs lately -- for the larger JavaFX stuff I do and the smaller TornadoFX apps I support -- have been to establish a one-direction object graph whereby commands go from View -> ViewModel -> Model. I then use notifications or the Event Bus as a back channel for when the frontmost layers need to be aware of some data that's just come in.
    g
    s
    • 3
    • 4
  • i

    iari

    10/29/2018, 7:19 PM
    So this is what I came up with.
    What_I_came_up_with.pl
    g
    • 2
    • 1
  • i

    iari

    11/01/2018, 7:22 PM
    the KEEP proposal with the most votes right now (type classes for kotlin) is from one of the arrow guys i think: https://github.com/Kotlin/KEEP/pull/87
    a
    • 2
    • 2
  • i

    iari

    11/01/2018, 9:12 PM
    I want to check out Ktor too
    a
    • 2
    • 3
  • s

    Spike Baylor

    11/01/2018, 10:06 PM
    ok, anyone have a good example of something like a side navigation menu, where each item would bring forward a new view into the main viewing area? I'm using the JFoenix drawer and all of that is fine. I'm looking more for the "right" way to handle setting up the menu items, clicking on them, and having the views change, and having the active menu item be highlighted. Its one of those things i know i can brute force my way into with actions and listeners and things we hate, but want to try to do it in a more proper tornadofx/binding/eventbus way.
    a
    • 2
    • 5
  • i

    iari

    11/02/2018, 9:30 AM
    I have a sealed parent class with one open value. 2 child classes implement it, overriding that value. And I want to make something happen to the value upon object creation. Dont know how to achieve that.
    r
    • 2
    • 3
  • c

    carlw

    11/02/2018, 11:39 AM
    you'll want a weak reference if you're going to keep a bi-directional relationship
    😮 1
    a
    • 2
    • 1
  • c

    carlw

    11/02/2018, 12:15 PM
    if you want to learn more about weak references, I'd read a few articles on "weak" with Swift, Objective-C or C#. they seem a little more honest about its importance than Java
    👍 1
    a
    • 2
    • 1
  • i

    iari

    11/02/2018, 4:01 PM
    Sergio: what do you mean with style based on two columns?
    s
    • 2
    • 15
  • s

    sp33dy

    11/02/2018, 4:08 PM
    @iari no, populate is walking all files 😞 this Leaf method is cleaner and faster for client
    👍 1
    i
    • 2
    • 3
  • i

    iari

    11/02/2018, 4:08 PM
    @Sergio Casero As far as i know, there is no such thing as an explicit "on item click listener" What I have been doing so far, which worked quite well, is the following:
    Untitled.kt
    s
    e
    • 3
    • 12
  • c

    carlw

    11/03/2018, 12:02 AM
    @Spike Baylor I ended up punting on the ListMenu and used a ToggleGroup. But this has the concept: two UI controls drawing their value off of the same model element. The EventBus figures prominently here as a way of giving the model a single point of update.
    Two_Controls__One_Bound_Model_Property.kt
    s
    • 2
    • 2
  • s

    Spike Baylor

    11/03/2018, 3:43 PM
    .jfx-hamburger StackPane {
    this part specifically
    r
    • 2
    • 3
  • v

    ValV

    11/03/2018, 11:02 PM
    How do I create a Gradle build script with Kotlin DSL, not Groovy? Are there some examples?
    e
    • 2
    • 3
  • i

    iari

    11/04/2018, 1:40 PM
    Just added TornadoFX to the skill-icon wall on my homepage ;D
    🤘 1
    🌪️ 2
    v
    • 2
    • 4
  • c

    carldea

    11/04/2018, 11:28 PM
    Hello all, I'm am a long time JavaFX enthusiast, but new to Kotlin and TornadoFX. I was able to run the hello world example easily from the IntelliJ plugin. So far it's been pretty simple to use.. I'm still kicking the tires.😁 Some of you I follow on Twitter.
    🤘 2
    🌪️ 2
    s
    r
    a
    • 4
    • 7
  • t

    thomasnield

    11/05/2018, 5:59 AM
    @carldea I think we discussed that about two weeks ago. I'm still trying to get RxJavaFX 11 deployed. It's definitely on our minds.
    c
    • 2
    • 6
  • s

    Sergio Casero

    11/05/2018, 9:01 AM
    Hi guys, how can I fit component to the parent size when I have this hierarchy?
    r
    • 2
    • 20
  • c

    carlw

    11/05/2018, 12:13 PM
    @carldea did you ever use Visage with JavaFX?
    c
    • 2
    • 1
Powered by Linen
Title
c

carlw

11/05/2018, 12:13 PM
@carldea did you ever use Visage with JavaFX?
c

carldea

11/05/2018, 6:15 PM
I played with it for a short period of time, but it was an effort to preserve the JavaFX script language (1.x) . Since JavaFX at the time (2.x) became Java APIs, and many members couldn't keep Visage updated. Stephen Chin initiated it at first.
View count: 1