Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when hotswapping CSS file name #20

Closed
DonyorM opened this issue Jul 25, 2017 · 2 comments
Closed

Error when hotswapping CSS file name #20

DonyorM opened this issue Jul 25, 2017 · 2 comments

Comments

@DonyorM
Copy link

DonyorM commented Jul 25, 2017

I have a setup where the name of my .css file is stored in the data-state atom. I tried using the method suggested by this blog post on how to dynamically update the style on the repl. However, about 50% of the time when I set the css file to a new string (with (swap! data-state assoc-in [:ui :stylesheets] ["main.css"])) the below error occurs. Even if the error doesn't occur, the window does not update its style. At the very least, I imagine the error message should be improved.

#error {
 :cause Assert failed: TODO: Implement this
(= idx (count lst))
 :via
 [{:type java.lang.AssertionError
   :message Assert failed: TODO: Implement this
(= idx (count lst))
   :at [fn_fx.fx_dom.FXDom$fn__18087 invoke fx_dom.clj 33]}]
 :trace
 [[fn_fx.fx_dom.FXDom$fn__18087 invoke fx_dom.clj 33]
  [clojure.lang.AFn run AFn.java 22]
  [com.sun.javafx.application.PlatformImpl lambda$null$173 PlatformImpl.java 295]
  [java.security.AccessController doPrivileged AccessController.java -2]
  [com.sun.javafx.application.PlatformImpl lambda$runLater$174 PlatformImpl.java 294]
  [com.sun.glass.ui.InvokeLaterDispatcher$Future run InvokeLaterDispatcher.java 95]
  [com.sun.glass.ui.gtk.GtkApplication _runLoop GtkApplication.java -2]
  [com.sun.glass.ui.gtk.GtkApplication lambda$null$49 GtkApplication.java 139]
  [java.lang.Thread run Thread.java 745]]}
 "Elapsed time: 3.601076 msecs"
@nblumoe
Copy link
Contributor

nblumoe commented Jul 25, 2017 via email

@DonyorM
Copy link
Author

DonyorM commented Jul 25, 2017

That worked. Thanks for your help.

@DonyorM DonyorM closed this as completed Jul 25, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants