This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-21
Channels
- # admin-announcements (1)
- # beginners (3)
- # boot (242)
- # clara (1)
- # cljsrn (8)
- # clojars (2)
- # clojure (68)
- # clojure-russia (23)
- # clojure-spec (28)
- # clojure-uk (11)
- # clojurescript (7)
- # datavis (3)
- # datomic (21)
- # emacs (2)
- # events (2)
- # hoplon (56)
- # jobs (3)
- # lambdaisland (1)
- # mount (20)
- # off-topic (4)
- # om (13)
- # onyx (17)
- # other-languages (2)
- # parinfer (7)
- # proto-repl (2)
- # proton (2)
- # protorepl (53)
- # re-frame (13)
- # reagent (3)
- # ring-swagger (22)
- # specter (5)
@alandipert: thanks! My first exposure to it was today and it definitely sidetracked me for a while 🙂
I have a select
element (as part of a form-group
) which I create like this:
(select :class "form-control" :value offer-type-input :change #(reset! offer-type-input @%) :id "inputOfferType"
(if-tpl (cell= (seq offer-types))
(map #(option :value (:shortname %) (text (:name %))) @offer-types)))
Somehow :change
throws an error: Error: No protocol method IDeref.-deref defined for type object: [object Object]
. Shouldn’t the type be fine?@beatngu13 are you sure that offer-type-input
is a Cell?
The input parameter my handler receives somehow doesn’t match. It’s that #object[Object [object Object]]
-thing… though offer-type-input
is a cell.
Printing to .log js/console
reveals Object { originalEvent=Event change, type="change", target=select#inputOfferType.form-control, more…}
.
and the error is because something called reset!
on a js object that doesn't implement the IDeref
protocol