reveal

Lukas Domagala 2021-12-03T01:55:57.119Z

@vlaaad good grief, working with the javafx webview is hard! i managed to finally call some js code from inside clojure and then some clojure code from inside js, if you are interested in making that possible

Lukas Domagala 2021-12-03T09:42:27.119600Z

@vlaaad here’s a gist of the basic idea to get both directions working: https://gist.github.com/Cyrik/4928f9db6af820af6fc443c50c958be5 I’d be nice if I could get the WebView without touching the internal of cljfx, but I only just started looking at it. Quick question about cljfx threading stuff: is there a way for me to run some of my code in that tread and to jump back into my thread from an eventHandler?

vlaaad 2021-12-03T09:46:41.119800Z

fx/on-fx-thread to run code on ui thread

vlaaad 2021-12-03T09:47:17.120Z

Back into your thread — that looks like something you need to setup yourself..

vlaaad 2021-12-03T09:48:23.120200Z

Do you only need serial execution on your thread? Maybe you could use agents in that case..

Lukas Domagala 2021-12-03T11:33:48.120400Z

> back into … yeah I don’t think I need anything complicated there. the idea would be to rerun the code that generated some visualization when you click on a specific part of the vega renderer. I haven’t fully figured out the controls or the flow yet, but I’d like to be able to use vega as a UI for my lib, so that they can communicate back and forth. Is there an example somewhere of calling back into user code from a reveal view on the users thread that i could borrow?

vlaaad 2021-12-03T12:08:40.120600Z

https://vlaaad.github.io/vega-in-reveal

vlaaad 2021-12-03T12:09:24.120900Z

There is a small Vega example I did before, but that's without 2-way interactions..

Lukas Domagala 2021-12-03T13:08:20.121100Z

ah sorry, I explained myself incorrectly. I’ve got my vega running already. what i meant i meant was just a very basic call from inside a reveal window into the user code thread, but i’ll check the docs for that.

vlaaad 2021-12-03T06:28:28.119100Z

Yes I am! I've been meaning to improve web view to host interop, but couldn't find the time so far

vlaaad 2021-12-03T06:28:57.119300Z

If you have some snippets to share, that would be nice :)