cljfx

https://github.com/cljfx/cljfx
OrdoFlammae 2020-04-08T00:48:00.042Z

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?

OrdoFlammae 2020-04-08T00:48:12.042300Z

Things like :fx/type.

OrdoFlammae 2020-04-08T00:48:24.042600Z

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

vlaaad 2020-04-08T06:11:32.043100Z

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

vlaaad 2020-04-08T06:12:17.044Z

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

vlaaad 2020-04-08T06:13:13.044600Z

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

vlaaad 2020-04-08T06:25:21.045Z

@ordoflammae ^

OrdoFlammae 2020-04-08T15:53:26.045900Z

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?

OrdoFlammae 2020-04-08T16:00:55.046400Z

Ah. Thanks.

OrdoFlammae 2020-04-08T16:01:06.046600Z

Why isn't that the default?

vlaaad 2020-04-08T16:05:03.046800Z

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

vlaaad 2020-04-08T16:07:05.047100Z

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

OrdoFlammae 2020-04-08T16:07:44.047300Z

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

vlaaad 2020-04-08T16:50:18.047800Z

What do you mean by window process?

OrdoFlammae 2020-04-08T16:59:08.048Z

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.

OrdoFlammae 2020-04-08T16:59:37.048200Z

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

OrdoFlammae 2020-04-08T16:59:51.048400Z

The problem is fixed when I restart my REPL.

vlaaad 2020-04-08T17:08:00.048600Z

fx/unmount-renderer and then mount again

vlaaad 2020-04-08T17:08:44.048800Z

Or just call renderer without arguments once to force refresh everything

OrdoFlammae 2020-04-08T17:11:17.049Z

OK, thanks, that makes sense.

vlaaad 2020-04-08T17:15:50.049200Z

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.