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

    louiscad

    11/05/2018, 3:31 PM
    I remember seeing the
    block: Boolean
    parameter that I can set to
    true
    , but I prefer to avoid it, especially since I may need the main thread for other coroutines to continue running (I am a "heavy" coroutines user). The extension I posted in a snippet above should work well for my use case, but I'll look into scopes still, thanks for the recommendation!
    g
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    11/07/2018, 4:51 PM
    here's an example from ListView cell selection:
    s
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    11/07/2018, 4:51 PM
    s(listCell and selected) {
                backgroundColor += Color.TRANSPARENT
            }
    🤔 1
    👍 1
    r
    t
    • 3
    • 9
  • t

    thomasnield

    11/07/2018, 6:13 PM
    Is there anything at the top of anyone's mind that could be remedied with this?
    n
    a
    • 3
    • 2
  • j

    jschneider

    11/08/2018, 7:43 AM
    Hi guys. I have created some extension methods that work fine for me. They can be used to use MigPane with TorandoFX: https://gist.github.com/jschneider/1dfe88fb8b0cac9f29a0964a2084a61f Any feedback greatly appreciated since I am (still) a beginner in Kotlin and TornadoFX.
    h
    • 2
    • 1
  • r

    Roman

    11/09/2018, 1:21 PM
    Hello, i have borderpane with current top ( hello world - text, update, logs, exit buttons) How i can align text to left top and buttons to right top ? i tried to use something like this
    top {
                    hbox {
    
                        vbox(alignment = Pos.TOP_LEFT) {
                            text("Hello")
                            text("World")
                        }
    
                        hbox(3, alignment = Pos.TOP_RIGHT) {
    
    
                            button("Update") {
                                action {
                                    homeController.updateCurrentDevices()
                                }
                            }
    
                            button("Logs") {
                                action {
                                    logView.openModal(stageStyle = StageStyle.DECORATED)
                                }
                            }
    
                            button("Exit")
                        }
                    }
                }
    t
    s
    • 3
    • 4
  • g

    gtnarg

    11/09/2018, 2:36 PM
    There is a project out there there (that I can't remember the name of) that provides sample code for a bunch of frameworks all building something the same thing to a spec. The spec is intentionally more involved than a ToDo app. I would like to start collaborating on implementing a sample app that would answer many of the questions people have using TornadoFx. Does this ring a bell with anyone?
    a
    s
    • 3
    • 3
  • e

    edvin

    11/09/2018, 3:12 PM
    @hudsonb I'm working on a tool store application that's slightly larger than the other samples. It does direct database access, no REST. It will be a rewrite/more complete version of this app: https://github.com/edvin/edgecam_toolmanager
    h
    • 2
    • 1
  • a

    alex

    11/10/2018, 5:17 PM
    @carlw what about binding then? Isn't it better to update property in controller and so notify the view, rather than fire very specific event with one receiver in shared bus?
    c
    g
    • 3
    • 3
  • e

    edvin

    11/10/2018, 5:43 PM
    @alex You have to specify a module, and that module must have access to all the code needed for the project to run. Not sure I understand why you don't select the module that contains your app class? This would have dependencies on the other modules, wouldn't it?
    a
    j
    a
    • 4
    • 16
  • a

    amanda.hinchman-dominguez

    11/11/2018, 12:50 AM
    @carldea I think you can - tornadofx is known to work with legacy items - although, if you'd like, you can use these examples to start threading your old stuff into type-safe css: https://edvin.gitbooks.io/tornadofx-guide/content/part1/6.%20CSS.html
    c
    • 2
    • 1
  • c

    carlw

    11/11/2018, 1:46 AM
    looks good @carldea
    c
    • 2
    • 1
  • s

    sp33dy

    11/11/2018, 11:50 AM
    ..so wonder if these are what I need?
    g
    • 2
    • 2
  • s

    Spike Baylor

    11/11/2018, 1:52 PM
    I would just like to thank those of you who routinely give help in this channel, and those who give help when they can. I snoop a bunch of other channels and most of them are good too, but often very specific in the types of topics they allow. their perogative of course, but its nice to know that people here seem willing to answer things that aren't 100% kotlin/tornadofx, but still related to gui dev.
    🎉 8
    a
    • 2
    • 1
  • s

    Spike Baylor

    11/11/2018, 6:21 PM
    what is the best way to get an onCloseRequest action setup? Specifically I'm trying to add basically a cancel close or save work and close type behavior. I just don't know where specifically to setup the onCloseRequest.
    • 1
    • 1
  • s

    sp33dy

    11/11/2018, 7:13 PM
    Let's not go there. Some of us have no choice; given the number of clients they have
    🤔 1
    a
    • 2
    • 1
  • s

    Spike Baylor

    11/11/2018, 11:22 PM
    so maybe off topic, but would anyone be willing to take a look at one of my screens and give some general UI advice?
    a
    c
    • 3
    • 18
  • s

    Spike Baylor

    11/11/2018, 11:26 PM
    quite fine if that oversteps the use here 🙂
    c
    • 2
    • 1
  • c

    carlw

    11/12/2018, 12:29 AM
    @carldea Are you going to post the meme generator code to a public repo?
    c
    • 2
    • 1
  • j

    jschneider

    11/12/2018, 12:16 PM
    When I look at the code, I see that the "graphicProperty" is only bound if "graphic != null". Any idea why this is necessary? Or is this maybe a typo and should be "if (graphicProperty!=null)"?
    g
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    11/13/2018, 2:43 AM
    I have a tough time believing that it wouldn't support windows though....
    h
    • 2
    • 1
  • c

    carlw

    11/13/2018, 3:07 AM
    @hudsonb Have you seen these notes from a few years ago on useSystemMenuBar? http://bekwam.blogspot.com/2015/11/mac-menus-in-javafx-app.html
    h
    • 2
    • 2
  • e

    edvin

    11/13/2018, 9:21 AM
    We're discussing the version number for the JDK10+ compatible version of TornadoFX over at https://github.com/edvin/tornadofx/pull/797. This version will also remove deprecated functions and clean up the API so it will not be a drop in replacement. We're thinking TornadoFX 2.0, with a TornadoFX 2.0-RC as the first release. We will need extensive testing before a production release, so focus will be on getting something runnable out there as quick as possible. What do you guys think?
    🐿 1
    🌪️ 5
    👍 4
    a
    a
    • 3
    • 6
  • r

    Romanow

    11/13/2018, 10:27 AM
    p.s. anyone going to Devoxx tomorrow?
    a
    • 2
    • 1
  • e

    edvin

    11/13/2018, 11:16 AM
    @alex I will update FXLauncher to support JDK11/TornadoFX 2.0
    a
    • 2
    • 3
  • e

    edvin

    11/13/2018, 6:31 PM
    @Ruckus I agree it would be nice, but let's not do anything that delays the release this time around. @hudsonb Yeah, REST is probably the most obvious candidate for modularization, even though it's not huge. In fact, the whole framework is still pretty small, so it's not like the space requirements are really an issue for most applications IMO.
    👍 2
    n
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    11/13/2018, 7:10 PM
    I'm looking into failing tests for stylesheets. Looks like the string evaluations need to be trimmed because all the white space makes them unequal. Still having some compiling issues for the jdk10 branch -
    r
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    11/13/2018, 7:15 PM
    [ERROR]   StylesheetTest.propertySelectionScope:290->shouldEqual:622 expected:<.label {
        [            -fx-base: rgba(255, 0, 0, 1);
                }
                .label:hover {
                    -fx-base: rgba(0, 0, 255, 1);
                ]}> but was:<.label {
        [-fx-base: rgba(255, 0, 0, 1);
    }
    .label:hover {
        -fx-base: rgba(0, 0, 255, 1);
    ]}>
    r
    • 2
    • 6
  • a

    amanda.hinchman-dominguez

    11/13/2018, 7:30 PM
    @Ruckus given this information, I don't know if Kotlin is able to override a particular function with an extension function. Perhaps we can just rename it?
    a
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    11/13/2018, 7:31 PM
    named it to stripTFX - I'll push it up in a new PR 🙂
    r
    • 2
    • 4
Powered by Linen
Title
a

amanda.hinchman-dominguez

11/13/2018, 7:31 PM
named it to stripTFX - I'll push it up in a new PR 🙂
r

Ruckus

11/13/2018, 7:32 PM
Sounds good, though I would have suggested something more descriptive like "normalizeWhitespace`, but I get a bit overzealous about that sometimes 🙂
a

amanda.hinchman-dominguez

11/13/2018, 7:33 PM
I'll have that fixed 😄
I am NOT good at naming things
r

Ruckus

11/13/2018, 7:34 PM
It's not a big deal, especially for a private function. Just me being, well, me 🙂
View count: 1