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

    orangy

    07/30/2018, 6:17 PM
    imageview
    calls
    attachTo
    which calls cryptic
    opcr
    .
    r
    e
    • 3
    • 5
  • a

    abhinay

    07/30/2018, 6:24 PM
    The
    imageview()
    used by orangy looks like an extension function
    g
    • 2
    • 2
  • o

    orangy

    07/31/2018, 8:18 AM
    @edvin Is there a roadmap for 2.0 available? I think for now the most annoying issue for me is lack of variance in binding and related generics… I can talk to compiler team, but I may need more input from you on this.
    r
    • 2
    • 5
  • e

    edvin

    07/31/2018, 8:30 AM
    @orangy No, we haven't created a roadmap yet. I'll get started on that right away 🙂
    o
    • 2
    • 2
  • r

    Roman

    07/31/2018, 9:40 AM
    How i can add listener for selectedValue , that works when mouse click to combobox item, rather than in the updateItem
    c
    • 2
    • 3
  • c

    carlw

    07/31/2018, 1:23 PM
    @Roman I'd work the OnEditCommit rather than use a custom factory (updateItem). Steer away from adding listeners unless absolutely needed
    ComboBox_in_TableView_w__OnEditCommit.kt
  • c

    carlw

    07/31/2018, 6:09 PM
    I've done this by swapping in different stylesheets.
    ➕ 3
    n
    • 2
    • 1
  • w

    wakingrufus

    07/31/2018, 7:03 PM
    i am trying to use the guide here: https://edvin.gitbooks.io/tornadofx-guide/content/part2/JSON%20and%20REST.html and in my json model, i am getting compile errors when I try to delegate to the property saying
    Property delegate must have a 'setValue(AuthRequest, KProperty<*>, [ERROR : Type from delegate])' method. None of the following functions is suitable:
    did something change in how these work?
    a
    • 2
    • 2
  • a

    anidotnet

    08/01/2018, 6:54 AM
    I am trying to subscribe to the WINDOW_SHOWN events for all stages. But I can do it only for the primary stages but not for any other stages I create from it.
    class MainView : View("Hello TornadoFX") {
        override val root = hbox {
            label(title) {
                addClass(Styles.heading)
            }
    
            button ("Second View") {
                setOnAction {
                    find<SecondaryView>().openWindow(StageStyle.DECORATED)
                }
            }
        }
    
        override fun onDock() {
            super.onDock()
            currentStage!!.setOnShown {
                println("MainView $it")
            }
        }
    }
    
    class SecondaryView : View("Hello Secondary View") {
        override val root = hbox {
            label(title) {
                addClass(Styles.heading)
            }
        }
    
        override fun onDock() {
            super.onDock()
            currentStage!!.setOnShown {
                println("Secondary $it")
            }
        }
    }
    Any idea why I can't listen to stage shown event for other stages?
    • 1
    • 1
  • c

    carlw

    08/03/2018, 11:47 AM
    I've found that busy loops often take up more processing even with the sleep. You can check if this is the case through JVisualVM. Disable the busy loop and look at the CPU usage. Then enable the busy loop. I believe the overall % of use will be raised. With a JavaFX SchedulerService, I think you'll find the usage "bursty" but in line with what you actually expect. Also, I haven't seen your Controller, but be aware that runLater() doesn't mean that the UI update will run now. I've seen these runLater() s stack up and only be executed after the long running process. The screen waits and then a flood of updates come in, effectively zooming to 100%. updateProgress / Message have been more reliable for me.
    🙏 1
    g
    • 2
    • 1
  • r

    Rob

    08/03/2018, 3:14 PM
    Combobox_with_hover_styles.kt
    👍 1
    🌪️ 2
    f
    c
    • 3
    • 4
  • n

    Nico Smeenk

    08/04/2018, 11:45 AM
    Hello, I have a quick question. Is there a simple was to make the a form field title vertical alignment to top?
    • 1
    • 1
  • i

    iLobanov

    08/04/2018, 1:41 PM
    @carlw Ok! Also still have question about internal window. How to handle InternalWindow close event?
    c
    • 2
    • 6
  • a

    amanda.hinchman-dominguez

    08/05/2018, 3:12 AM
    @carlw I wonder if this is perhaps is something I'd need to modify listview behavior for and add a flag for it. I'll go digging around in the source code, but I did notice the following behavior: on a listview, if the particular cell does not grow past the limit in the view, no scroll is there - if I scroll to a cell that expands past the width, then it shows up for the duration the cell is in the view.
    c
    • 2
    • 2
  • h

    Hamza

    08/05/2018, 3:21 AM
    Is there a way to make it so that the scroll bar goes to the very bottom? So like if you're making an app and every time someone sends a message to automatically force the scrolling to the latest message
    a
    • 2
    • 4
  • i

    iLobanov

    08/05/2018, 5:13 AM
    @carlw here is no problem with resizing. Problem was in child bounds of datagrid cells. Them moved a little bit out of parent conteiner. In your example also.
    c
    • 2
    • 17
  • c

    carlw

    08/06/2018, 1:32 PM
    @fucata I'm curious about the project requirement to use declarative statements over CSS. I think you'll find yourself fighting JavaFX at every turn if you go with this approach. That is, with a component like ComboBox, there are multiple styles involved: hover, select, etc. This example sets the style using a Kotlin assignment, but you'll see that the hover will also need to be accommodated.
    f
    • 2
    • 6
  • c

    carlw

    08/06/2018, 7:06 PM
    @fucata pass a styleClass parameter to LanguageSelector (say "english"). Then, the stylesheet will use this key in refining the styles. Like this in plain CSS syntax .english .language-selector-tile { background-image: img("uk_flag.png") } .spanish .language-selector-tile { background-image: img("spain_flag.png") }
    f
    • 2
    • 3
  • r

    Roman

    08/13/2018, 9:44 AM
    i need build tornadofx application to exe with resources, conf , etc... will work this approach ? https://github.com/FibreFoX/javafx-gradle-plugin
    w
    • 2
    • 1
  • c

    carlw

    08/15/2018, 7:01 PM
    Working version (tested on Ubuntu)
    Working_version.kt
    a
    • 2
    • 3
  • c

    carlw

    08/16/2018, 2:19 PM
    As an aside for anyone learning Kotlin, we had an internship this summer and completely validated that you don't need to learn Java in order to use Kotlin. In some cases (speaking for myself), it probably holds you back. Still good for reading Javadoc, but that's just looking at basic specifications that don't need to be in Java anyway
    👍 5
    😀 1
    o
    a
    • 3
    • 5
  • b

    Boyong

    08/16/2018, 5:36 PM
    Hey guys I manage to solve my problem. thanks
    r
    • 2
    • 2
  • e

    edvin

    08/19/2018, 3:27 PM
    Huh.. It seems the IDEA plugin is no longer associated with my jetbrains user, so I can't upload a new version.
    n
    • 2
    • 3
  • e

    edvin

    08/20/2018, 11:56 AM
    I haven't heard back from JetBrains yet regarding my access to the IDEA plugin. Will let you know as soon as I hear from them
    o
    • 2
    • 2
  • s

    SiebelsTim

    08/22/2018, 11:57 AM
    @nimakro I would've assumed it as well. Default value seems to be 'LATEST-EAP-SNAPSHOT' @orangy Do you mean converting JavaFx properties to delegates is too intrusive? That hasn't changed in the latest version I believe. Also, I'd be happy to get stacktrace for exceptions 🙂
    o
    e
    • 3
    • 15
  • a

    amanda.hinchman-dominguez

    08/22/2018, 2:52 PM
    This is actually what my workshop is on today. I'm hoping I will be able to get a video recording to share later 🙂
    💯 2
    e
    • 2
    • 2
  • c

    carlw

    08/23/2018, 2:02 PM
    @beepdog Here's an example that works with a list and allows a multiple record update
    ItemViewModel_Example_w__Android-Like_List_Edit.kt
    b
    • 2
    • 3
  • e

    edvin

    08/24/2018, 7:22 AM
    @amanda.hinchman-dominguez That's how it's always been, openjdk on Linux doesn't include JavaFX. I normally like to install Oracle JDK, or you can as you've figured out just install openjfx as well. This will be a moot point as we target JDK11 and the decoupled JavaFX of course 🙂
    👍 1
    a
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    08/24/2018, 7:30 PM
    Is there a way to set the root to be the full size of the screen?
    b
    a
    • 3
    • 11
  • r

    Ruckus

    08/25/2018, 11:12 PM
    First line of the README:
    Important: TornadoFX is not yet compatible with Java 9/10
    c
    c
    • 3
    • 4
Powered by Linen
Title
r

Ruckus

08/25/2018, 11:12 PM
First line of the README:
Important: TornadoFX is not yet compatible with Java 9/10
c

Czar

08/25/2018, 11:30 PM
well, it does work if I run it from IntelliJ 🙂 So it is at least partially compatible. The problem I'm struggling with is obviously with gradle setup, not tornadofx
r

Ruckus

08/25/2018, 11:34 PM
Interesting. I wonder if IntelliJ is running it on JDK 8 under the covers.
c

Czar

08/26/2018, 12:59 AM
It does not, I had to jump through all the usual
module-info.java
hoops before I was able to run it. Also Java `*.class`es in the project have bytecode version 54.0 (Java 10).
c

carlw

08/26/2018, 1:28 AM
The incompatibilities are mostly caused by private com.sun classes that were changed to public APIs; most of tornadofx doesn’t use them however
View count: 4