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

    jchildress

    10/19/2017, 7:11 PM
    http://dlsc.com/2017/10/19/calendarfx-goes-open-source/
    🤘 4
    n
    • 2
    • 1
  • e

    edvin

    10/23/2017, 11:24 AM
    @pike You can do
    val listOfStrings = jsonArray.map { it as JsonString }.map { it.string }
    👍 1
    p
    • 2
    • 1
  • e

    edvin

    10/24/2017, 11:27 AM
    @carlw Yeah, I guess it depends on the use case, but it would be nice to be able to detect issues and show them before the UI is shut down. Not quite sure what would be the best way to do that. Would be easier with an actual use case.
    c
    c
    a
    • 4
    • 10
  • z

    zealous

    10/24/2017, 2:59 PM
    @thomasnield for the second time I failed to choose suitable braces ...
    selectedProperty().toObservable().subscribe{signalController.filterSwitchSubject}
    instead of
    selectedProperty().toObservable().subscribe(signalController.filterSwitchSubject)
    . Which is syntactically close but crucial with regard to emitting events or not.
    😬 4
    t
    • 2
    • 6
  • e

    edvin

    10/25/2017, 9:17 PM
    @kastork You mean you want to shut down the JVM and immediately start a new with the same parameters? I think you'd need to inspect the environment to figure out what parameters was passed, where the java binary is located etc and start a new process before you do System.exit. Maybe there is a library out there for that?
    k
    • 2
    • 2
  • c

    carlw

    10/25/2017, 10:13 PM
    wow. quick hour…install time just went to 1 minute
    r
    z
    • 3
    • 6
  • a

    amanda.hinchman-dominguez

    10/25/2017, 10:14 PM
    file:/img/MetroTileHomepage.png doesn't freak out but does not return an image, I guess I'll have to keep playing around with it. I'll let you know what the solution was!
    r
    c
    e
    • 4
    • 11
  • c

    carlw

    10/26/2017, 2:27 PM
    great....the code that reads in the byte[] should be in a Task too with a progress bar (when you get around to it)
    a
    • 2
    • 5
  • e

    edvin

    10/26/2017, 8:26 PM
    @amanda.hinchman-dominguez Do you mean "convert" a TornadoFX Type Safe stylesheet to a text based css file or the other way around? You can get the resulting css text from a type safe stylesheet by calling
    render()
    on the stylesheet.
    a
    • 2
    • 6
  • j

    jelloranger

    10/27/2017, 9:18 AM
    Hey guys, I'm having a lot of trouble trying to generate a DMG from a TornadoFX project on OS X. Does anyone know what arguments to supply to javapackager to get it to work properly? (I don't know what the put for all the "-outdir/-outfile" arguments and the documentation I've found on Oracle's website hasn't been so great)
    a
    • 2
    • 2
  • c

    carlw

    10/27/2017, 7:37 PM
    @edvin @amanda.hinchman-dominguez If you want to handle the pagination outside of the datagrid, you can do something simple like this. WARNING: Oscilloscope Content https://courses.bekwam.net/public_tutorials/bkcourse_tornadofx_slideshow.html
    a
    e
    • 3
    • 2
  • e

    edvin

    10/28/2017, 9:58 AM
    @amanda.hinchman-dominguez Will this be OK for your use case? I've committed it now. It still needs some more features to work in every situation but I think it's a good start.
    👍 1
    a
    • 2
    • 1
  • j

    jmmk

    10/29/2017, 3:39 AM
    Anyone have recommendations on managing lifecycle of background services inside a JavaFX/tornadofx app? I see that I can override
    start
    and
    stop
    methods of
    App
    to potentially run initialization code there Looking for a clean way to hook into application start/stop for stateful services like database connections without causing any issues for JavaFX
    c
    • 2
    • 2
  • m

    Marcin Wisniowski

    10/30/2017, 10:12 PM
    Worked right away, the problem is that the context menu won't show up and click events don't work ;/
    c
    • 2
    • 1
  • c

    carlw

    11/01/2017, 8:09 PM
    @Greg Stepniewski when you tried my example w. anchorpane, did you have anything set on imageview like fitHeight/width?
    • 1
    • 1
  • e

    edvin

    11/01/2017, 8:16 PM
    I just released the new version of the IDEA plugin. It should be available within the hour 🙂
    j
    • 2
    • 2
  • e

    edvin

    11/02/2017, 7:00 AM
    @Marcin Wisniowski Are you not using Maven or Gradle to build your app?
    m
    • 2
    • 1
  • m

    Marcin Wisniowski

    11/02/2017, 11:00 PM
    I want to style my entire app, but not a website I'm loading inside a WebView.
    • 1
    • 1
  • t

    thomasnield

    11/03/2017, 8:47 PM
    And we would have an awesome opportunity to end this Electron nonsense.
    ❗ 1
    ➕ 2
    🎉 7
    n
    • 2
    • 1
  • e

    edvin

    11/04/2017, 9:56 AM
    @wakingrufus The framework tests contains a few, but no established patterns or best practices I'm afraid. We do need them though!
    w
    • 2
    • 1
  • s

    snrostov

    11/04/2017, 11:15 AM
    Which way is preferred to use custom component in DSL? Operator
    +=
    or create custom builder function?
    t
    • 2
    • 2
  • e

    edvin

    11/04/2017, 3:15 PM
    @snrostov I tend to favor
    add
    , but if you add the same type of component often, creating a small builder is even better. It takes no time at all 🙂
    s
    • 2
    • 1
  • d

    deviant

    11/04/2017, 8:41 PM
    guys, does anybody know what happened with jpro.io? the site is down last 2 days
    j
    • 2
    • 1
  • e

    edvin

    11/06/2017, 12:53 PM
    What do you mean by "Why can I not reference a mutable variable in type-safe language, but I can change the value of it?"? You can indeed reference a mutable variable and even assign a new value to it.
    a
    • 2
    • 1
  • j

    jschneider

    11/07/2017, 3:55 PM
    I think
    item?.observable(PersonKotlin::name)
    returns
    Property<String?>?
    for your Kotlin sample. I think the type should be
    Property<String?>
    instead?
    r
    • 2
    • 2
  • t

    thomasnield

    11/08/2017, 4:20 PM
    https://twitter.com/jpro_io/status/928285305152638976
    💪 1
    👍 3
    r
    c
    +2
    • 5
    • 8
  • w

    wakingrufus

    11/08/2017, 11:40 PM
    Naive question: what is the value of adding views/fragments to a view using find() dependency injection and params VS calling a constructor and passing args into it? I can see that allowed views to be reused, but if the views are cheap to create, are there any other benefits?
    t
    e
    • 3
    • 5
  • k

    kastork

    11/09/2017, 5:02 PM
    Anyone know how to make a Spinner with the editable property set commit for reasons other than hitting "Enter"? Like if the user tabs out of the control
    r
    c
    • 3
    • 22
  • s

    snrostov

    11/10/2017, 10:44 AM
    BTW, I'm working on crossplatform UI framework. Native rendering pipeline is quite different from javaFX. Main rendering/painting/composite concepts: - corutine based parallel rendering pipeline (like https://servo.org/) with ability to postpone rendering of slow components to next frame (like in react fiber) - layouting algorithm works only in simple one pass. Based on simple min/max box constraints (NOT like complex constraints solver in MacOS/iOS and web/css). Size constraints passed down to the tree, layout passed back to up. - benefit from ability of fast performance of compositor (modern hardware very fast on it) - vulkan for windows/linux/android, metal for osx/ios Widgets framework: - react/flutter-like widgets framework: Widget acts as react props and is immutable. State stored in Widget Holder which is hidden for user code. - Mutable listenable editor model used only for editing objects, not widgets (like in javafx) - Code based on common widgets works on web
    • 1
    • 1
  • d

    dr.fornax

    11/10/2017, 3:15 PM
    I get an “java.lang.IllegalStateException: Not on FX application thread; currentThread = tornadofx-thread-1” Exception and am a bit confused since I thougt the tornadofx Thread should be an FX application thread?
    w
    • 2
    • 1
Powered by Linen
Title
d

dr.fornax

11/10/2017, 3:15 PM
I get an “java.lang.IllegalStateException: Not on FX application thread; currentThread = tornadofx-thread-1” Exception and am a bit confused since I thougt the tornadofx Thread should be an FX application thread?
w

wakingrufus

11/11/2017, 7:06 PM
One solution is to wrap any code which will touch the UI in Platform.runLater{ ... }
View count: 2