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

    littlelightcz

    02/19/2019, 9:40 AM
    Hi, quick question: is there a simple way of having right-aligned labels for all fields inside a
    form { }
    ?
    c
    • 2
    • 4
  • i

    iari

    02/19/2019, 8:02 PM
    I've managed to make a nice gradle task to deploy via FTP for myself 🙂
    c
    • 2
    • 1
  • n

    nate

    02/21/2019, 7:23 PM
    thanks i'll take a look at that project and see if that helps
    • 1
    • 1
  • s

    sbyrne

    02/21/2019, 7:27 PM
    I started a project to use the MacOS menu bar from TornadoFX applications. It needs some cleanup to be usable as a library, but it proves the approach: https://github.com/smbyrne/tfxmmb
    a
    • 2
    • 7
  • e

    edvin

    02/23/2019, 8:56 AM
    @littlelightcz I've added those functions now. They also take an optional
    clickCount
    parameter.
    l
    • 2
    • 2
  • n

    Nikky

    02/24/2019, 12:56 PM
    so .. we want to use tornadofx as a viewer for a non fx based core, what is the best way to make lists observable? atm i have mostly MutableList and MutableMaps, exposed as List and Maps mostly is there a way for tornadofx to register a callback that the core can call on change that triggers a update for the observable properties or would it be a better idea to use coroutines in the core and send updated values via channlels? can tfx listen to those and convert them into observables ?
    s
    g
    • 3
    • 12
  • n

    Nikky

    02/25/2019, 5:15 PM
    whats the correct code to run a lambda on the fx thread ?
    c
    • 2
    • 1
  • w

    wakingrufus

    02/25/2019, 6:52 PM
    Hi, quick question, how can I make a tableview able to be copy/pasted into another app, like a text editor? I want to be able to select a whole column, or a whole table and copy the contents out (preferably in csv format)
    👍 1
    a
    • 2
    • 8
  • s

    Shan

    02/25/2019, 11:28 PM
    Hey all. Having a bit of an issue with animating after switching a VBox to be a global value. Anyone know why the animation is happening instantly after the inputted time instead of interpolating?
    BlurAnimationTest.kt
    h
    a
    • 3
    • 8
  • c

    carlw

    02/27/2019, 3:04 AM
    no, use val f = find<MyFragment>()
    s
    h
    • 3
    • 9
  • c

    carlw

    02/27/2019, 12:19 PM
    @Shan find() is programatic dependency injection for TornadoFX. You can also inject dependencies statically using "by inject()" on a declaration. Dependency Injection, in general and not just with TornadoFX, lets you wire up object graphs. This avoids a cascading set of special constructors and setters that might be needed for a given object to properly function. By object graph, I mean a complex object that references other objects (which in turn reference other objects). It's definitely feasible to do this by hand, especially if the object graph is shallow. However, industry-wide, many are have seen deeper object graphs become a source of maintenance problems as different developers come up with different ways to hook everything up. You'll see DI in the Spring framework, JavaEE EJBs, and web technologies like Angular. In your case, find<MyFragment>() instantiates a new object. However, if you call find<MyView>(), a new object may not be instantiated. That can be overridden, but it seems to be a guiding convention in this group. DI lets you control the scope of the object (ex "just this once" versus "app-wide").
    s
    • 2
    • 8
  • g

    g4sarma

    02/28/2019, 11:28 AM
    While i love tornadoFx i still find designing the UI as a painstaking task. I would love to know what is your preferred method/tools for creating UI ?
    c
    c
    +5
    • 8
    • 26
  • c

    carlw

    02/28/2019, 6:51 PM
    @littlelightcz have you seen sortedfilteredlist? https://github.com/edvin/tornadofx/wiki/Utilities
    👍 1
    l
    • 2
    • 1
  • e

    edvin

    02/28/2019, 7:36 PM
    @littlelightcz Please add issues with the suggestions so we can discuss the best approach or implementation 🙂
    l
    • 2
    • 2
  • e

    edvin

    02/28/2019, 7:37 PM
    Sorry for being away even more than usual lately.. Been house hunting and I just pulled the trigger on a house it seems 🙂 hehe
    🎉 4
    🏠 2
    r
    c
    • 3
    • 2
  • c

    Czar

    03/01/2019, 11:20 AM
    Here's one from my toy project
    build_gradle_kts.py
    g
    • 2
    • 1
  • k

    Kevin

    03/01/2019, 12:25 PM
    If you use IntelliJ and the tornadoFX plugin, there’s an option to make a tornadofx-gradle-project that will set up a “hello world” app. Regarding the “mpp” part of your request, are you trying to use kotlin native? TornadoFX, as I understand it, only works on the JVM. So you can use it wherever you use the JVM. If you want to target iOS or the web, you’ll need to use other clients as well. You can still have your core logic in Kotlin though.
    g
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    03/03/2019, 11:00 PM
    EventBus_update_script_after_execution.kt
    o
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    03/03/2019, 11:02 PM
    I don't think line 49 is being fired, so I don't think I'm calling this correctly
    o
    m
    • 3
    • 14
  • a

    amanda.hinchman-dominguez

    03/06/2019, 4:51 AM
    java.lang.ClassCastException: tornadofx.Scope cannot be cast to knote.tornadofx.model.NotebookScope
    	at knote.tornadofx.view.NotebookSpace.<init>
    c
    o
    • 3
    • 4
  • s

    Shan

    03/09/2019, 11:26 AM
    Hey all. Got a question about structuring (I'm re-structuring my project to use dependency injection and some viewmodels and encountering some issues.. with my brain) if anyone has a moment. I have a fragment that the user can open modally, after which they can enter a new name for a
    label
    , and then save it. Once saved, (or I guess, "committed" via the model) the name needs to be updated in several difference places within the application. Right now how I'm doing it is when the
    label
    is instantiated, it is added to a map which contains the label's string name, and a random UUID (to prevent issues with two names that are the same). I then set a listener on that map everywhere I need to update the name, and when I 'save' within the renaming fragment, I update the map entry with the new string, which then sets it elsewhere in the application. I'm trying to rewrite this using a ViewModel, but am unsure if I'm on the right track (or understanding it properly). I was thinking something like this? Is this the right setup? (Have some questions in the comments in the snippet)
    Untitled.kt
    • 1
    • 2
  • s

    Shan

    03/09/2019, 12:08 PM
    Okay, after thinking about it more, maybe this is actually the best way to do this?
    new_idea_with_Custom_Scope.kt
    c
    • 2
    • 4
  • c

    carlw

    03/09/2019, 1:45 PM
    @Shan See if this does what you want. Clicking on the field name in the lower details panel brings up an input dialog. Entering a String will update both the tableview panel and the the lower details panel.
    TextInputDialog___EventBus.kt
    s
    • 2
    • 1
  • n

    Nikky

    03/12/2019, 12:36 AM
    which component would i use if i want to use
    text {
        font = Font.font(java.awt.Font.MONOSPACED, font.size)
    }
    but also want to make it possible for the user to select and copy ? i tried to use a textarea instead but that one has a scrollpane built in and i have no idea how to disable that
    h
    • 2
    • 2
  • s

    Shan

    03/12/2019, 11:29 PM
    I'm thinking Sharknado vibes for TFX mascot 🦈🌪️
    🦈 2
    🌪️ 1
    c
    • 2
    • 2
  • c

    carlw

    03/14/2019, 8:35 PM
    @brian can you retrofit your beans to use javafx properties? that way they'll be autoupdated
    Dot_Notation.java
    b
    • 2
    • 3
  • i

    iari

    03/14/2019, 9:59 PM
    Hey - I have a question which is actually just JavFX specific ... I hope I won't get crucified asking that one here anyways: I am working on a kind of song-editor (an editor for BeatSaber) in tornadofx right now. I couldn't find any readily avbailable components for a timeline, so I had a go at it myself. right now, I am just using the translateXProperty and scaleXProperty of the pane in which the blocks/notes sit. However, I actually want the option, just to scale the position of the notes, but not necessarily the image content of the notes. IS that in some way possible with node transforms? Or do I have to implement that by myself, relocating all nots on zoom-level change?
    2019-03-14 22-54-44.mp4
    r
    • 2
    • 1
  • m

    Manpreet Singh

    03/18/2019, 7:48 AM
    Hello. I have just started with Kotlin a month back and decided my first project should be in TornadoFX even though I have 0 experience with JavaFX. I have been loving it though. All the issues I faced, I was able to resolve by carefully reading through SO questions and the guide. I am however, now stuck on one issue that I cannot seem to figure out. When I open another view from a listview as follows:
    ProjectView().openWindow()
    How do I prevent the window close button from working. I tried putting
    primaryStage.setOnCloseRequest{}
    in the view root but it does not work.
    g
    • 2
    • 4
  • c

    carlw

    03/18/2019, 11:36 AM
    @Manpreet Singh Here's a demo with a pair of examples. The top button brings up a modal dialog without any OS window controls including the close button. The button button uses setOnCloseRequest, but on the modalStage object and within the onDock function.
    modalStage_Sets_OnCloseRequest.java
    m
    • 2
    • 1
  • a

    abhinay

    03/21/2019, 8:38 AM
    @Ruckus Is there a new keyboard in progress? Or is it the Torando keyboard?
    r
    • 2
    • 1
Powered by Linen
Title
a

abhinay

03/21/2019, 8:38 AM
@Ruckus Is there a new keyboard in progress? Or is it the Torando keyboard?
r

Ruckus

03/22/2019, 2:47 AM
Just the Tornado as far as I'm aware
View count: 1