This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-26
Channels
- # admin-announcements (1)
- # beginners (12)
- # cider (2)
- # cljs-dev (6)
- # cljsrn (4)
- # clojure (123)
- # clojure-austin (10)
- # clojure-brasil (1)
- # clojure-canada (21)
- # clojure-conj (5)
- # clojure-dev (8)
- # clojure-gamedev (42)
- # clojure-russia (121)
- # clojure-sanfrancisco (2)
- # clojure-spec (25)
- # clojure-uk (36)
- # clojurescript (195)
- # clojutre (3)
- # cursive (43)
- # datomic (6)
- # defnpodcast (2)
- # dirac (14)
- # emacs (2)
- # ethereum (2)
- # events (2)
- # funcool (6)
- # hoplon (76)
- # jobs (1)
- # kekkonen (9)
- # lein-figwheel (1)
- # leiningen (4)
- # mount (6)
- # off-topic (5)
- # om (2)
- # onyx (91)
- # pedestal (2)
- # protorepl (14)
- # re-frame (22)
- # reagent (20)
- # rethinkdb (1)
- # ring (2)
- # schema (3)
- # sfcljs (3)
- # spacemacs (15)
- # specter (12)
- # testing (1)
- # yada (63)
@micha Instead of using a case-tpl, I need to use a multi-method to dispatch the element. How to do this? I tried if-tpl, but to no avail. Perhaps defelem will work?
@laforge49 you can use multimethods, why not?
(defmulti foop (fn [x y z] ...))
(if-tpl (cell= (< x 100))
(foop ...)
(something-else ...))
I tried that in an if-tpl. First, I needed to dereference the cell when calling foop from the body of the if-tpl. Second, the subtree didn't change when x changed.
Hmm. I assumed I needed to dereference because the cell itself was passed. Which generally means it didn't work.
What I can't get working is any kind of loop, even for-tpl, for calling all the subdom trees
but I only seem to be able to allocate by including each child explicitly. Or can I use apply???
Or rather, @micha, I should say that I'm composing a vector of all possible children.
Here's the start of my multi-tab demo: https://github.com/tiples/welcome/blob/master/src/cljs/index.cljs.hl
The idea is that which tabs are available to a user depends on the individual account.
In this example, Freddy Krugar has access to the shared contacts, but Kriss Kringle does not.
My code was working, then I moved a few things to another namespace. Not sure what I did wrong, can't make sense of the trace.
@laforge49: does it work if you create a local let binding for 'login/dispatch' as a different var?
Oh great. I had checked in the last working version. Undid all the changes to get back there and the problem persists.
It is now in the same namespace and does not work. I'm back now to what used to work, as best I can determine using git.
I have a new method of making my IDE do a commit to my local repo on every file save for this reason
And then I just rebase to remove the unneeded commits
@laforge49: do you have a cell of cells?
Solved by @flyboarder - just pass a vector to an element. It flattens it.