[ClojureScript] Re: Question: Om, multimethod and local state

2014-07-21 Thread feng zhou
On Friday, July 18, 2014 2:02:54 AM UTC+10, Jarppe Länsiö wrote: I have this same problem. I thought multimethods would be great way to render different views in simple page app, so I wrote something like this: (def app-state {:view :login}) (defmulti render-view (fn [app owner]

[ClojureScript] Kioo and devcards

2014-07-21 Thread Andreas Liljeqvist
Anyone using devcards with Kioo and Om? I have got 2 problems with the workflow. 1. After updating a html-file I have to make sure that the cljs is recompiled by forcing a save. 2. If I change the value of the appstate in the cljs and save, nothing happens in the browser until I do a manual

Re: [ClojureScript] goog undefined error from clojurescript version 2197 and up

2014-07-21 Thread David Nolen
Did you try with master? There was a ticket for this recently for a nearly identical sounding issue. David On Sun, Jul 20, 2014 at 4:40 PM, Gary Trakhman gary.trakh...@gmail.com wrote: That seems to work, but I still need to know why it's failing in my tooling project, which uses leiningen of

[ClojureScript] Re: Kioo and devcards

2014-07-21 Thread Mark Fisher
1. After updating a html-file I have to make sure that the cljs is recompiled by forcing a save. Kioo only scans the html at compile time, so just saving html won't do anything if it doesn't trigger a recompile of the cljs in your workflow. 2. If I change the value of the appstate in the

[ClojureScript] Re: Kioo and devcards

2014-07-21 Thread Andreas Liljeqvist
1. I wanted to know if there is any way of specifying that changes in html always should trigger a recompile in a cljs. 2. In this figwheel example: http://rigsomelight.com/2014/05/01/interactive-programming-flappy-bird-clojurescript.html They are using defonce to ensure that the atom doesn't

Re: [ClojureScript] Re: Kioo and devcards

2014-07-21 Thread Daniel Kersten
Mark, when running devcards in figwheel, usually changing the state atom and refreshing does reload the state in the browser automatically without refresh. Andreas, I've noticed the same thing. #1 is the expected behaviour - figwheel has no way of knowing that it should recompile the cljs file

[ClojureScript] core.async - restriction on macros inside go block?

2014-07-21 Thread Tom Locke
Hi All, I had a terrible time trying to write a convenience macro for reading from a core.async channel. The idea was to make it easier to do the common dispatch on first part of a message pattern, as in: (let [[msg args] (! my-channel)] (case msg :msg1 (let [[a b] args]

[ClojureScript] Om - component local state as cursor?

2014-07-21 Thread Stefan Oestreicher
Hi, I'm struggling a little with the global app state in Om. When decomposing big components I find myself wanting to use a cursor around component local state to pass to children in order to get 2-way-binding between parent and child component but without exposing this information to the