https://kotlinlang.org logo
Join SlackCommunities
Powered by
# tornadofx
  • g

    geepawhill

    01/05/2023, 8:58 PM
    I am sticking with TornadoFx for now. It does appear to be moribund, but it just doesn't feel like there's anywhere to jump. I'll tell you one thing, my views are heavily isolated from my models which are heavily isolated from my domain code. 🙂
  • r

    Ryan Smith

    01/08/2023, 6:34 PM
    I also moved to Compose for Desktop. There are a few things that I found I had to put together myself e.g. a Table view, but overall I found it easier to get moving quickly with Compose for Desktop than I did with Tornado.
    👍 2
  • w

    wakingrufus

    01/12/2023, 11:07 PM
    i still use javafx + kotlin, but i copy the dsl stuff from tornado into my project. I have kicked around the idea of splitting just the dsl into a separate library, but never had had the time to work on it. i dont like the dependency injection and other stuff from tornado as much
  • w

    wakingrufus

    01/12/2023, 11:07 PM
    but i like java 17, so i cant just use tornadofx out of the box anymore
  • s

    Sebastian Schuberth

    01/13/2023, 9:13 AM
    Yeah, similar here. I was playing with the idea to auto-generate a Kotlin DSL from FXML / JavaFX API via https://github.com/square/kotlinpoet or so...
    w
    • 2
    • 1
  • k

    Kaj Koivunen

    01/15/2023, 7:39 PM
    is there any way to make a tableview editable by a single click rather than double-clicking a cell, think Excel? Also, am I missing some documentation for tornadofx because on the webpage, the guide barely scratches the surface of the api and the kdoc is plain unreadable?
  • k

    Kaj Koivunen

    01/15/2023, 8:18 PM
    "To allow editing and rendering, TornadoFX provides a few default cell factories you can invoke on a column easily through extension functions.",
    useTextField()
    for example, but how does one use it? It does not appear to be callable on a column at all.
  • k

    Kaj Koivunen

    01/15/2023, 8:33 PM
    Copy code
    tv.selectionModel.selectedItemProperty().addListener(fun(obs, oldSelection, newSelection) {
        if (newSelection != null) {
            val row: Int = tv.selectionModel.selectedCells[0].row
            val col = tv.columns[tv.selectionModel.selectedCells[0].column]
            Platform.runLater { tv.edit(row, col) }
        }
    appears to work for selecting cells with single click but I have no clue how I'd make it commit edits on focus loss or allow movement between cells using key combinations, as enter boots the focus to the parent element
  • k

    Kaj Koivunen

    01/15/2023, 8:33 PM
    I'm going to have to either fake a table with just vboxes of hboxes of textfields because tableview is impossible to work with given the zero documentation or find a completely differrent ui lib
  • t

    Tim McCormack

    01/15/2023, 9:05 PM
    How am I supposed to manage global state across views in a tornadofx application?
    w
    • 2
    • 5
  • k

    Kaj Koivunen

    01/24/2023, 11:27 AM
    I'm trying to add a "+" tab in a tabpane to create more tabs. Everything else is working fine, but calling
    close()
    from the tab itself throws a NPE. Minimal example:
    Copy code
    class addTab : View(" + ") {
        override val root = label("You should not see this.")
    
        override fun onTabSelected() {
            super.onTabSelected()
            with(MainView.tabs) {
                tab("new", nonuniqueTab("foo"))
                tabs[tabs.size - 1].select()
            }
            close()
        }
    }
    creates a new tab from fragment just fine, tabs is the tabpane, but close causes
    java.lang.NullPointerException: Cannot invoke "javafx.beans.value.ChangeListener.changed(javafx.beans.value.ObservableValue, Object, Object)" because "<local3>[<local7>]" is null
    Or is it possible to reorder or open a tab between existing tabs to avoid having to close and reopen the + tab?
    • 1
    • 1
  • t

    Tim McCormack

    04/02/2023, 11:08 PM
    I have a component where I want to have CSS classes I can toggle to change the appearance. However, this component can't add its Stylesheet to a Scene, since it isn't creating a Scene; the thing that is using this component makes the Scene, and does so after the component is instantiated. What's the right way to go about this?
    • 1
    • 1
  • b

    binarynoise

    04/13/2023, 5:03 PM
    ## (This project is no longer maintained) 😕 https://github.com/edvin/tornadofx/commit/94fd553aced7a2ffe7528b1977a9f8406028432c
    😢 2
    s
    w
    +2
    • 5
    • 11
  • m

    mariofelesdossantosjr

    04/28/2023, 12:09 PM
    Hello guys, is possible debounce click in button?
    g
    • 2
    • 1
  • g

    geepawhill

    07/10/2023, 12:58 PM
    <sigh> Using unsupported tornadofx is really getting to be a drag. The modules in the snapshot appear to be wrong.
  • m

    Marcin Wisniowski

    07/13/2023, 5:16 PM
    It was good while it lasted, but Compose Desktop seems to be the way forward.
  • w

    wakingrufus

    07/18/2023, 3:08 PM
    I still think vanilla javafx with kotlin is a good choice. But if we can get something like https://github.com/maroc81/kitfx going, its even better
  • g

    geepawhill

    07/18/2023, 4:49 PM
    I may just be a old stick in the mud, but compose desktop seems like a) it is the coming thing, b) it is not really ready for prime-time yet.
  • g

    geepawhill

    07/18/2023, 4:51 PM
    Still. I plan to engage with it seriously over the next year. My problem here is that my WIP is JavaFx. I just tore out 100% of my TornadoFX dependency to see if I could get to a proper binary executable w/o it, and it looks like I'm hella close.
  • g

    geepawhill

    07/18/2023, 4:52 PM
    I'll have to re-roll my whole UI in plain JavaFx or using kitfx, but if I can just get a damned GUI screen on a stranger's computer with a single link, I'll do whatever's necessary.
    w
    • 2
    • 3
  • g

    geepawhill

    07/18/2023, 4:54 PM
    I spoze it was just dumb of me to assume that the world's first "highly interoperable programming language" would be able to create an installable exe easily. 🙂
  • m

    mikehearn

    07/20/2023, 10:11 AM
    @geepawhill Take a look at https://hydraulic.dev/ - it's got built in javafx support and is used by some javafx apps
  • m

    mikehearn

    07/20/2023, 10:12 AM
    you run
    conveyor make copied-site
    and it packages/signs/uploads your release in such a way that existing installs self-update.
  • m

    mikehearn

    07/20/2023, 10:12 AM
    (disclosure: i make it) - it's about as close as you can get to pressing "enter" and getting a link you can send to people
    g
    • 2
    • 3
  • g

    geepawhill

    07/21/2023, 2:26 PM
    Thanks, Mike. I actually searched for it sometime last week, but it was told to me as "try conveyor", and there is no search term on earth that got me past hardware conveyor system and software. 🙂 I will definitely check it out.
  • m

    mikehearn

    07/21/2023, 3:14 PM
    That is indeed a problem with the name.
  • m

    mikehearn

    07/21/2023, 3:14 PM
    [conveyor desktop app packaging] does work but that's pretty specific
  • g

    geepawhill

    07/26/2023, 8:04 PM
    Latest dead-end: the badass plugin has two open bugs and an overworked caretaker. I can switch between the bugs at will. Further, all of this is w/o tornadofx as a dependency, so even were I to get past one of these bugs, I still have little confidence that I can get all the way to a binary.
  • g

    geepawhill

    07/27/2023, 4:31 AM
    I got, ummmm, I think I got, conveyor to work. Here's current status, via mastodon: https://mastodon.social/@GeePawHill/110783935130320427
    🎉 1
    w
    • 2
    • 1
  • k

    Katrina Eaton

    08/14/2023, 9:07 PM
    Quick question I hope someone can help me with. I have a view that uses a borderpane for root, with items in top, center, and bottom. The center item is a fragment (or view, I've tried both) that is supposed to swap out for a replacement fragment (or view). Instead it wipes the entire parent view, except for the original fragment, which is then up in the top left corner. (Simplified code fragments in the thread.) (Fixed)
    • 1
    • 4