https://kotlinlang.org logo
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
  • u

    ushort

    07/19/2019, 4:18 AM
    Any idea how I'd insert a view into tab like so
    class MainView : View() {
        override val root = tabpane {
            tab("Home") {
                //insert TestView
            }
        }
    }
    
    
    class TestView: View() {
        override val root = anchorpane {
            label("Test")
        }
    }
    s
    • 2
    • 2
  • d

    darkmoon_uk

    07/19/2019, 12:16 PM
    No...
    plugins {
        val kotlinVersion = "1.3.40"
        kotlin("jvm" ) version kotlinVersion
        id("application")
        id("kotlinx-serialization") version kotlinVersion
        id("org.openjfx.javafxplugin") version "0.0.7"
        id("org.beryx.jlink") version "2.9.4"
    }
    a
    • 2
    • 1
  • d

    darkmoon_uk

    07/19/2019, 1:34 PM
    Ugh, the Open JFX/11 experience is awful 😕. Java FX 8 'just works'. I'm throwing every combination of everything I can at this; the toolchain or plugins just seems broken; reports it can't see modules that are shown in the classPath.
    s
    • 2
    • 1
  • a

    abhinay

    07/19/2019, 1:54 PM
    @darkmoon_uk if this project is opens sourced, can you link me to it?
    d
    a
    • 3
    • 11
  • d

    darkmoon_uk

    07/22/2019, 10:07 PM
    Packaging this with
    javapackager
    is desirable, but the
    javapackager
    binary seems missing on JDK 12 / OS-X 🤔 Investigating...
    a
    t
    • 3
    • 3
  • a

    albrechtroehm

    07/26/2019, 11:49 AM
    Hey i'm also trying to package a app but couldn't get it running even looking at the sources from @darkmoon_uk. Maybe someone could help me to change this simple example from (https://github.com/beryx-gist/badass-runtime-example-javafx) to also use kotlin and tornadofx?
    t
    d
    • 3
    • 10
  • n

    n0rtan

    07/28/2019, 7:18 AM
    Hi guys ) please help me with Workspaces... I trying to add custom button to workspace from View. Used onDock callback. But there is a weird behavior: in my workspace two tabs, when I select another tab, the button doesn't hides... On return to first tab again, a second button adds... In other switches second button hides and appears, but first button still present... What am I doing wrong?
    • 1
    • 3
  • d

    darkmoon_uk

    08/07/2019, 1:59 PM
    I'm experienced in Rx but just embarking on my first 'Reactive Coroutines' journey with JavaFX - is this a reasonable way to get a
    Channel<ActionEvent>
    from a
    Button
    ? Is there an established library that already implements these kinds of Coroutines wrappings for JavaFX?
    Untitled
    d
    • 2
    • 2
  • a

    albrechtroehm

    08/07/2019, 2:10 PM
    Hey, im trying to build a simple Listview showing some houses with their name and the number of rooms. Somehow i'm unable to get the size of roomsList to display it. I think i'm not doing this property thing right at all ... Maybe someone could give me a hint at this
    class House(name: String = "", rooms: List<Room> = emptyList()) : NamedObject(name)
    {
    	val roomsProperty = SimpleListProperty<Room>(this, "rooms ",rooms.asObservable())
    	var rooms : ObservableList<Room> by roomsProperty
    }
    
    class HouseModel(house: ObjectProperty<House>) : ItemViewModel<House>(itemProperty = house)
    {
    	val name = bind(House::nameProperty)
    	val rooms = bind(House::roomsProperty)
    }
    ...
    
    class HouseListFragment : ListCellFragment<House>() {
        private val controller by inject<QuotationController>()
        private val house = HouseModel(itemProperty)
    
        override val root = vbox {
            hbox {
                vbox {
                    removeWhen { editingProperty }
                    label(house.name) {
                        setId(Styles.contentLabel)
                        hgrow = Priority.ALWAYS
                        useMaxSize = true
                    }
                    label(house.rooms.value.size.toString())
                    label(" rooms ") {}
                }
            }
        }
    }
    Doing something like
    private val roomNumber = SimpleIntegerProperty(house.rooms.value.size)
    always gives me 0 for a house which should have 3 rooms
    • 1
    • 3
  • d

    darkmoon_uk

    08/07/2019, 10:22 PM
    Anyone know of a library that implements Coroutine Channel/Flow wrappings for JavaFX component events? Or is there space to grow a new one?
    d
    r
    • 3
    • 15
  • b

    bjonnh

    08/09/2019, 4:05 PM
    any news on release of tornadofx for JDK>8
    m
    t
    • 3
    • 5
  • g

    geepawhill

    08/10/2019, 9:25 PM
    I've an existing tornadofx program that was still using
    Application
    instead of
    App
    . When I just changed it to the latter, I got an NPE on exit (in `App::stop()`because primaryStage wasn't set. I added to the existing start method
    FX.setPrimaryStage
    to get past that. I am now getting an NPE in the following lines, which seem to be finding and cleaning up the primary view. I'm starting to suspect "you're doing it wrong". Is my problem that I have a custom
    start()
    that doesn't call the super? Should I not override start at all and override some other method called by App::start instead? Should I also have overridden stop()? The existing
    start()
    is needed because the program has to first show a dialog box. It's possible that the user can cancel out, in which case I don't want the stage showing at all, just want to exit.
    c
    • 2
    • 2
  • s

    Spike Baylor

    08/11/2019, 2:46 PM
    anyone know what i'm doing wrong here with my binding? i have an object property (selectedItemProperty). i've attached a listener to that property and it emits as expected, but when i add a listener to my stringBinding it does not emit.
    Untitled
    • 1
    • 2
  • a

    Alen Mujezinovic

    08/14/2019, 11:18 AM
    Searching through channel history, it seems like coroutines are rather niche in TFX apps ...
    s
    • 2
    • 1
  • r

    ryn1x

    08/14/2019, 6:54 PM
    How can I set a close event for a view in TornadoFX? I have been searching the documentation and ide autocomplete and cannot figure it out.
    • 1
    • 2
  • g

    geepawhill

    08/23/2019, 4:14 PM
    Do we know of a working demo of a file upload or download with a progressbar using TornadoFX and Fuel? I think I see how to do it, but I'd love to have a cheat to look at.
    c
    • 2
    • 2
  • a

    Alen Mujezinovic

    08/29/2019, 10:21 AM
    Question: How do you bundle up your TornadoFX application for different platforms? I'm currently shipping a .jar file for Linux and MacOS and an .exe using
    launch4j
    - however
    launch4j
    seems to work on some systems and others not so I'm kind of looking for an alternative. Ideally I'd also want to create a .dmg file for MacOS and to top it off, it would be perfect to be able to ship the application and a JRE in a single package to avoid users having to install another dependency
    k
    d
    +5
    • 8
    • 12
  • a

    alilosoft

    09/01/2019, 12:53 AM
    Hi, I want to implement a classic master/detail view, where the master is a TableView of Employees and the details is a Form to edit the selected employee, I found several samples for that scenario, but what I don't like is using JavaFX properties in my domain models, I'm declaring my Employee domain model as POKO, an EmployeeModel as ItemVeiwModel, and defined all the bindings with the TableView and the Form, so my problem is that as I'm not using JavaFX properties in my domain model the table view doesn't reflect the changes in the ViewModel until I call refresh manually, and what I want is to be able to call refresh after the changes are committed to the model programmaticly, but I can't find any cleaner way to listen to model commit, without referencing the table view from the view model. Aany idea, solution, design pattern, code samples...🤔??? will be appreciated! 🙏
    d
    • 2
    • 3
  • g

    groostav

    09/07/2019, 10:08 PM
    does tornado FX provide any kind of system for using a node as a template? eg: I create say a gridpane with some specific row/column constraints, maybe some data, and then I want to
    copy()
    in the data-class sense, to create a new instance that renders the same data in the same way, but the new instance only has copies of user-facing properties and does not have copies of any yucky toolkit related properties? (EG
    parent
    )
    i
    • 2
    • 3
  • c

    czuckie

    09/15/2019, 6:02 PM
    is there any good testing blogs for tornado or even javafx? I'm used to having the ability to test at the level of a user tapping on things etc, is there anything similar for tornadofx?
    c
    • 2
    • 5
  • g

    groostav

    09/16/2019, 7:42 AM
    Hey guys, I'm looking to create a tabbed pane like the one in WPF, but im definately not a CSS wizard. Has anybody tried to get a kind of metro look-and-feel for tabs in javafx?
    • 1
    • 2
  • d

    dimitar_

    09/16/2019, 6:27 PM
    👍 1
    g
    • 2
    • 1
  • n

    Nikky

    09/21/2019, 1:57 PM
    anybody got a idea what could cause this? https://gist.github.com/NikkyAI/809525ed3466ec8ea179019dd3c41a2a this happens in a jfx/tornadoFX app that uses data2viz in a canvas and one additional textarea for log output figured it out.. something about unicode in strings messed up, so i have to try hard to not use geometric symbols from unicode
    a
    • 2
    • 3
  • s

    sbyrne

    09/24/2019, 1:57 PM
    I have a tableview with a
    cellFormat {}
    block in one of my columns. Why is my cellFormat not called when the value of the property bound to the column is changed?
    b
    • 2
    • 10
  • s

    sbyrne

    09/24/2019, 3:53 PM
    Is there a way to a) make editable table cells have textboxes all the time, not just after double-click, and b) commit instead of rollback on focus lost?
    b
    • 2
    • 3
  • s

    sbyrne

    09/24/2019, 7:36 PM
    If I am using a
    TableCellFragment
    , how do I bind a
    Property<CssRule>
    that sets the style for the
    tableRowCell
    ?
    • 1
    • 1
  • k

    Kirill

    09/25/2019, 9:23 AM
    Hello everyone. We use TornadoFX 1.7.18 and Java 8. We have an issue on macOS 10.15 Catalina Beta 9 (19A573a) (most up to date release) that when the app starts for the first time, it shows a warning message:
    "yourapplication" would like to receive keystrokes from any application.
    Grant access to this application in Security & Privacy preferences, located in System Preferences.
    This doesn't happen on older versions of macOS. Did anyone encounter such issue or maybe has any ideas? Best regards, Kirill
    r
    • 2
    • 9
  • r

    Ruckus

    09/25/2019, 4:18 PM
    Hopefully I'll get some time soon to get back into TFX again, so I decided to check the current state. When I run the test apps (on the
    jdk10
    branch), they mostly work, but not the DSL styles. I get
    WARNING: Resource "css://tornadofx.testapps.[...]" not found.
    Is there something I'm missing that I need to change to get this working?
    a
    • 2
    • 3
  • a

    albrechtroehm

    09/26/2019, 1:13 PM
    Hello everyone. I'm trying to add some buttons to the titleRegion of a titledpane, but somehow im struggling to find the right way. Should i look up the titleRegion in the childrens with
    getChildList()
    or ist there any other suitable way to access it?
    r
    • 2
    • 7
  • n

    Nikky

    10/02/2019, 3:11 PM
    so whats the easiest way in tornadofx to spawn a coroutine and run it in parallel ? it will be running a websocket connection and may trigger UI updates
    a
    • 2
    • 2
Powered by Linen
Title
n

Nikky

10/02/2019, 3:11 PM
so whats the easiest way in tornadofx to spawn a coroutine and run it in parallel ? it will be running a websocket connection and may trigger UI updates
a

altavir

10/02/2019, 3:54 PM
Я think, those are orthagonal. Tornado does not use coroutines, so the only thing you need to remember is to run UI actions on
JavaFX
dispatcher
n

Nikky

10/02/2019, 5:09 PM
i am running the websocket in
GlobalScope.launch
for now.. and all things interactin with javafx i do in
launch(Dispatchers.JavaFX)
, it seems to work, good enough for now
View count: 1