cljfx 2020-04-08

Why are the keywords used in the maps not namespaced? They seem like they ought to be namespaced, but they're not. Why is this?

Things like :fx/type.

Which, if it were namespaced, would be something like ::fx/type.

I made up my mind about namespacing keywords after I released cljfx

I would have them all namespaced if I were doing it again, but now we are stuck with compatibility 🙂

I learned JavaFX while writing cljfx, I used mostly plain old javadoc: https://openjfx.io/javadoc/14/

All the examples use fx/mount-renderer. However, when you close the window, the program doesn't actually stop. How do you quit the program?

Ah. Thanks.

Why isn't that the default?

If it was the default, it would allow opening only one window per jvm process

Because it would shut down javafx application thread and it can't be restarted once stopped, so no repl-driven development

Is there a way to stop the window process from the REPL without restarting the REPL?

What do you mean by window process?

I'm not so sure. I realize now that I was just guessing at a solution for a problem I'm having. Basically, when I start a window from the examples, close it, and try to rerun the fx/mount-renderer function, it doesn't show up, presumably because there's a process running in the background that's blocking it.

It does return a promise though, the window just doesn't appear.

The problem is fixed when I restart my REPL.

fx/unmount-renderer and then mount again

Or just call renderer without arguments once to force refresh everything

OK, thanks, that makes sense.

What happens is cljfx props are "descriptive, not prescriptive", which means that setting :showing to true does not force the stage to be showing all the time, but instead shows it once and that's it.