Fork me on GitHub
#hoplon
<
2016-07-21
>
adamw11:07:27

Has anyone seen this error before?

material.cljs:92 Uncaught TypeError: (intermediate value)(intermediate value)(...).call is not a function
It's happening with this code (`swap!` on a call), which I can't figure out at all:
(icon :sh (r 1 6) :fc font-black "keyboard_arrow_down" :click #((do
                                                                        (js/console.log "Now" is-open)
                                                                        (swap! is-open not)))))
Note that is-open is a cell; and that console log prints it happily as:
Now #<Cell: false>

adamw11:07:18

I've also tried (reset! is-open true) and pretty much anything else I can think of.

dm311:07:16

you have double parens: #((do ...))

dm311:07:52

which tries to invoke a boolean as a function

adamw11:07:04

thank you

adamw11:07:43

@dm3 I spent 10 mins trying to work out what I was doing wrong. doh.