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
  • b

    Brian

    03/22/2019, 4:35 PM
    I'm not fully understanding binding. I have a controller with a couple of properties (of type Int and of type String) that I want to bind to labels on the view.
    n
    10 replies · 2 participants
  • r

    ron

    03/25/2019, 6:13 PM
    @amanda.hinchman-dominguez @carlw So what I was thinking is that there is no clear article(s) about how to mock controllers. We often will use the
    by inject
    to get a controller. but often we do not want the actual controller, we want one that is not connected to that expensive (either in time or in money) API
    a
    1 reply · 2 participants
  • a

    abhinay

    03/26/2019, 4:21 AM
    @bjonnh Are you installing the TornadoFX jdk-10 branch on your local maven repo?
    b
    6 replies · 2 participants
  • r

    ron

    03/26/2019, 9:31 AM
    @amanda.hinchman-dominguez just saw your kotlinconf talk again, your memoize pattern is so elegant
    💯 1
    a
    1 reply · 2 participants
  • s

    Stephane M

    03/26/2019, 10:54 AM
    Hi there, so happy to be here! Writing a new application in TornadoFX and Kotlin and so far it's been great. Still beginning so encountering some issues, but happy to participate and learn more here 🙂
    🎉 5
    a
    2 replies · 2 participants
  • c

    carlw

    03/26/2019, 11:40 AM
    across windows, mac, and linux, the OK and Cancel are in different places (Ok on the left for windows, maybe right for linux). you define your buttons in terms of ok or cancel. you change the labels. if you need other buttons, you can add them and specify an order
    s
    1 reply · 2 participants
  • r

    ron

    03/26/2019, 12:12 PM
    I failed design 40 years ago and I keep failing it that is why UI designers were created 😉
    c
    1 reply · 2 participants
  • s

    Stephane M

    03/26/2019, 2:54 PM
    What's the problem with javafx >= 11? I just heard it was a separate component now, so that means we have to ship it as a jar on deployment?
    r
    r
    +2
    8 replies · 5 participants
  • c

    carlw

    03/26/2019, 3:54 PM
    if you're on a budget, a ZIP plus two scripts (one .bat, one .sh) would work too. the script would call fx launcher
    👍 1
    s
    d
    3 replies · 3 participants
  • n

    nate

    03/26/2019, 6:21 PM
    I have a quick question. Is there a way to style the
    bar
    or
    track
    of a
    progressbar
    using inline styles. i've had success in the stylesheets, but i haven't figured out a way to do it inline though
    r
    6 replies · 2 participants
  • c

    carlw

    03/27/2019, 8:44 PM
    Unfortunately, I usually build out a global style sheet. Have you seen scoped CSS in web frameworks @Ruckus? Is that what you're thinking of ?
    r
    4 replies · 2 participants
  • e

    ec

    03/28/2019, 8:15 PM
    Why
    checkbox
    in
    treeview
    loses its check state when an items gets expanded/collapsed? I added checkbox like this
    treeview {
      ...
      graphic { checkbox {} }
    }
    r
    1 reply · 2 participants
  • r

    ron

    04/06/2019, 10:33 AM
    You have to start the javafx application before you start the other threads and coroutines
    s
    2 replies · 2 participants
  • c

    carlw

    04/06/2019, 10:59 AM
    @Stefan Beyer what mechanism would you like to use for the push notifications? I prefer web sockets but there’s also JMS or polling
    s
    1 reply · 2 participants
  • c

    carlw

    04/06/2019, 12:31 PM
    @Stefan Beyer take a look at this example. I'm posting an EventBus event back to the UI. It MUST be run on the UI thread which is the runLater() line
    File_Watcher_Demo_w__TornadoFX.kt
    s
    r
    10 replies · 3 participants
  • r

    ron

    04/06/2019, 6:00 PM
    what games do you play (my favourites are factorio, empyrion and satisfactory)
    s
    5 replies · 2 participants
  • a

    alilosoft

    04/07/2019, 6:04 AM
    Hi, does any one has code examples for testing TornadoFx components using TestFx?
    c
    5 replies · 2 participants
  • r

    r4zzz4k

    04/10/2019, 7:12 PM
    Do I understand correctly that there is no way to map
    List<T>
    from data class to
    ListProperty<T>
    in
    ItemViewModel
    , as the latter expects
    ObservableList<T>
    ?
    g
    r
    3 replies · 3 participants
  • a

    Avighnash

    04/10/2019, 11:58 PM
    how would you go about changing the radius of each edge of a button?
    a
    1 reply · 2 participants
  • e

    edvin

    04/11/2019, 6:58 AM
    @Carlton Whitehead The explanation for your issue is quite simple: If you embed "subview" inside "mainview", then mainview will have it's onDock called when it's window is docked and subview will have it's onDock called when it is attached to mainview. However, when you close the window, only mainview is undocked from it's window. subview is still attached to mainview, so it will not receive any onUndock callback. If you later show mainview again, it will once again receive a call to onDock. subview has been docked to mainview the whole time, hence no onUndock callback.
    c
    c
    5 replies · 3 participants
  • s

    Stéphane Derosiaux

    04/11/2019, 7:17 PM
    The best way I have right now (to let the coroutine stuff) is to subscribe
    onChange
    to the data list then to subscribe to the modifiable properties of the added elements, to trigger the
    refresh()
    on the table. Ouch.
    😡 2
    c
    2 replies · 2 participants
  • c

    carlw

    04/11/2019, 8:06 PM
    Can you post some code @mariofelesdossantosjr ?
    m
    11 replies · 2 participants
  • c

    carlw

    04/12/2019, 11:53 AM
    @otakusenpai create a JavaFX property backing each of the three fields. Then, in your action handler, call your connect() routine
    o
    1 reply · 2 participants
  • c

    carlw

    04/14/2019, 12:35 AM
    everyone is skipping over 9 and 10 because their support ends even before java 8's. so, 11 is really what we're talking about these days even if older tickets say 9 or 10
    a
    1 reply · 2 participants
  • a

    amanda.hinchman-dominguez

    04/14/2019, 6:51 PM
    Wow really sad how busy I've been lately - I'm writing a blog this week about reified generics in Kotlin. This story actually inspired me from TornadoFX - I remember the first time I was in awe over how beautiful the code was and one day, decided to look into the source code to see how it worked
    👍 2
    n
    10 replies · 2 participants
  • e

    edvin

    04/16/2019, 6:01 PM
    @Stephane M No, fxlauncher updates before each start, no other mode is available as of now :)
    s
    c
    8 replies · 3 participants
  • a

    amanda.hinchman-dominguez

    04/18/2019, 2:15 PM
    Happy Kotlin Thursday! As promised - https://link.medium.com/e7OvFkXnZV
    🌪️ 2
    👍 1
    🤘 2
    🎉 1
    r
    r
    11 replies · 3 participants
  • a

    alilosoft

    04/21/2019, 11:38 PM
    Hi, I read in tornadofx guide that Views, Controllers and Models are Singeltones, If I would like to mock a controller or a model for testing, how I can do that?
    r
    4 replies · 2 participants
  • c

    Carlton Whitehead

    04/23/2019, 12:31 PM
    I'm seeing some issues with components leaking after tests. The app primary view instance survives and still receives dock/undock calls. I also noticed if I pause the test thread, (not the FX thread), and press alt+meta+j, I get exactly the number of layout debuggers on screen as test methods have started in the current process. I have an
    @AfterEach
    which does
    FxToolkit.cleanupStages()
    and
    FxToolkit.cleanupApplication(app)
    . The app instance is also nulled out and recreated between tests. Am I missing something or is this a bug?
    1 reply · 1 participant
  • s

    Stephane M

    04/24/2019, 10:33 AM
    The last constraint is that we use extensively the
    config
    helper, so if the user didn't have to see that
    conf
    folder next to the executable that'd be great (i.e. if the executable was installed in Application for Mac OS X or Program Files for Windows)
    c
    w
    15 replies · 3 participants
Powered by Linen
Title
s

Stephane M

04/24/2019, 10:33 AM
The last constraint is that we use extensively the
config
helper, so if the user didn't have to see that
conf
folder next to the executable that'd be great (i.e. if the executable was installed in Application for Mac OS X or Program Files for Windows)
c

Carlton Whitehead

04/24/2019, 11:39 AM
I set my app up to resolve its conf folder using the appdirs library https://github.com/harawata/appdirs
s

Stephane M

04/24/2019, 11:41 AM
so do you use this instead of the
config
helper in tornadofx?
class MyApp : App(WelcomeView::class) {
    override val configBasePath: Paths.get("/etc/myapp/conf")
}
You would use this here, right?
c

Carlton Whitehead

04/24/2019, 11:47 AM
override configBasePath, exactly
override val configBasePath: Path = Paths.get(URI.create("file://" + AppDirsFactory.getInstance()
            .getUserConfigDir(
                    "digital-raw-sheet",
                    drsProperties.getString("coner-drs.version"),
                    "coner"
            )
))
AppDirsFactory comes from that lib
s

Stephane M

04/24/2019, 11:48 AM
Cool, and so then we can just simply distribute a jar cross platform, and then tell our users to do whatever with it
so we wouldn't need any installers of any kind would we?
because that now the config and the executable are decoupled
c

Carlton Whitehead

04/24/2019, 11:49 AM
That puts the config in a customary location for the runtime OS, decoupled from the executable path
s

Stephane M

04/24/2019, 11:50 AM
sweet! 🙂
have you used IzPack by any chance?
c

Carlton Whitehead

04/24/2019, 11:52 AM
No
s

Stephane M

04/24/2019, 11:56 AM
No worries thanks 🙂
w

wakingrufus

07/30/2019, 7:02 PM
i use the javafx gradle plugin, and it works nicely
View count: 1