Fork me on GitHub
#reveal
<
2021-04-23
>
motform07:04:34

I'm still having some namespace issues when sending remote controll commands. I'm sure its something on my end, but maybe you can help me out.

motform07:04:00

Commands like {:vlaaad.reveal/command ((requiring-resolve (quote vlaaad.reveal.ext/clear-output))), :ns #namespace[user]} work flawlessly. However, when I try to open a view using {:vlaaad.reveal/command ((requiring-resolve (quote vlaaad.reveal.ext/open-view)) {:fx/type vlaaad.reveal.ext/action-view, :action :vlaaad.reveal.action/view:bar-chart, :value [1 2 3]}), :ns #namespace[user]} I get a java.lang.ClassNotFoundException. Successfully evaluating any other commands solves the issue for all subsequent view commands, presumeably by then having required the namespaces.

motform07:04:58

My first instinct was to wrap action-view in a requiring-resolve like so: {:vlaaad.reveal/command ((requiring-resolve (quote vlaaad.reveal.ext/open-view)) {:fx/type (requiring-resolve (quote vlaaad.reveal.ext/action-view)), :action :vlaaad.reveal.action/view:bar-chart, :value [1 2 3]}), :ns #namespace[user]}, but this results in a java.lang.IllegalArgumentException: "No implementation of method: :create of protocol: #'cljfx.lifecycle/Lifecycle found for class: clojure.lang.Var"

vlaaad08:04:40

Add deref to second requiring-resolve

reveal 3
motform08:04:39

That did the trick, thanks!