This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-09
Channels
- # announcements (47)
- # asami (43)
- # babashka (37)
- # beginners (119)
- # bitcoin (1)
- # calva (5)
- # circleci (5)
- # clj-kondo (36)
- # cljs-dev (5)
- # cljsrn (1)
- # clojure (92)
- # clojure-australia (2)
- # clojure-bay-area (2)
- # clojure-europe (121)
- # clojure-italy (7)
- # clojure-japan (1)
- # clojure-nl (4)
- # clojure-serbia (2)
- # clojure-uk (66)
- # clojuredesign-podcast (2)
- # clojurescript (19)
- # conjure (2)
- # cursive (13)
- # data-oriented-programming (2)
- # datomic (53)
- # defnpodcast (7)
- # depstar (33)
- # events (1)
- # fulcro (21)
- # graalvm (47)
- # jobs (1)
- # kaocha (1)
- # lambdaisland (1)
- # luminus (2)
- # malli (14)
- # membrane (16)
- # off-topic (45)
- # polylith (2)
- # re-frame (11)
- # reitit (7)
- # releases (1)
- # reveal (15)
- # rewrite-clj (123)
- # shadow-cljs (7)
- # sql (21)
- # startup-in-a-month (3)
- # tools-deps (25)
- # vim (2)
I'm experimenting a bit with the remote control capabilities for an emacs-mode that I'm making, but I'm having some trouble with the :ns
key in the command map. I get that it changes the ns for anything evaluated, but it seems to mean that it is unable to find reveal-functions when I specify a namespace :cause "Unable to resolve symbol: open-view in this context"
.
From the example:
(defn add-1 [x]
(+ 1 x))
{:vlaaad.reveal/command '(open-view {:fx/type vlaaad.reveal.ext/action-view
:action :vlaaad.reveal.action/view:table
:value (add-1 1)})
:ns 'foo.core}
The reason for this is that I want to be able to eval a form in the editor and send the result directly to a view. I recon this could also be done by evaluating the form using regular evaluation, save the result and then pipe that result into the reveal/command map, but that would cause the original evaluation to show up in the reveal history.
I see there is also the :env
key, but that seems unwieldly when working with evaluations of unspecified depth.
Hi! open-view is a function in vlaaad.reveal.ext ns, if you are using different ns, you should use fully-qualified call to open-view
btw right now this ns is not loaded by Reveal automatically, but when invoking Reveal command it will make sure the ns is loaded before evaluation. This means just using full form might throw exception if user didn't require that ns before. More reliable way to open the view when using different ns is requiring-resolve, i.e. ((requiring-resolve 'vlaaad.reveal.ext/open-view) ...)
I'm really liking the remote-controlling so far! The only thing I'm missing would be a command to close the result panel
But other than that, it's really magical to see your data come to life directly from the editor!