I have the following code:
(defn log-call [call]
(.log js/console (pr-str call)))
(defn generate-report []
;; Get the data from the textarea calls_log
(let [all-calls (.split (.-value (.getElementById js/document
"calls_log")) "\n")
[calls-headers & calls-log] all-calls]
; Output all calls to the console log
;(.log js/console (pr-str calls-log ))))
(map log-call calls-log)))
That code works on the REPL connected to the browser, and the date is
displayed on the console. However, the compiled code doesn't run on the
browser. I've tried debugging it with Chrome, but I'm not getting any
errors, and I don't really know what's going on when following it step by
step.
If I comment the last line and uncomment the second to last, the code works
on the browser. So basically if I don't do the map, it works. I am very
confused.
I only started using ClojureScript today, and already had a bunch of
problems (including not being able to get domina 1.0.2-SNAPSHOT to work,
trying to follow the moder_cljs tutorial), so I would really appreciate
some help with this. Thank you very much!
Nico
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.