Hi Paul, the following should work:
(ns example.hello (:require [goog.dom :as dom])) (dom/append .. ..) Julien 2014-03-26 9:53 GMT-03:00 Paul Butcher <[email protected]>: > I'd be grateful for suggestions on how to address this - the problem > affects the ClojureScript examples that accompany the book that I'm in the > process of writing (Seven Concurrency Models in Seven Weeks > http://pragprog.com/book/pb7con) and means that the examples don't work > when updated to use the most recent ClojureScript release :-( > > Thanks in advance. > > -- > paul.butcher->msgCount++ > > Silverstone, Brands Hatch, Donington Park... > Who says I have a one track mind? > > http://www.paulbutcher.com/ > LinkedIn: http://www.linkedin.com/in/paulbutcher > Skype: paulrabutcher > > Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel > http://pragprog.com/book/pb7con > > On 24 March 2014 at 12:45:17, Paul Butcher ([email protected]) wrote: > > I'm not sure whether it's an issue with lein-cljsbuild, the most recent > ClojureScript, or my understanding of how dependencies work in > ClojureScript. Here's how to reproduce it. > > If you take the "simple" example project from lein-cljsbuild: > > > https://github.com/emezeske/lein-cljsbuild/tree/master/example-projects/simple > > And modify hello.cljs so that it references goog.dom: > > (ns example.hello > (:require [goog.dom :refer [append createDom getElement]])) > > (js/alert "Hello from ClojureScript!") > > > Everything compiles just fine. If you then, however, update the version of > ClojureScript in project.clj to 0.0-2173, do a "lein cljsbuild clean" > followed by "lein cljsbuild once", you get the following warnings: > > WARNING: Referred var goog.dom/createDom does not exist at line 1 > src-cljs/example/hello.cljs > > WARNING: Referred var goog.dom/append does not exist at line 1 > src-cljs/example/hello.cljs > > WARNING: Referred var goog.dom/getElement does not exist at line 1 > src-cljs/example/hello.cljs > > > This works fine with all the earlier versions of ClojureScript I've tried. > What's the approved way to use goog.dom in the most recent ClojureScript? > > -- > paul.butcher->msgCount++ > > Silverstone, Brands Hatch, Donington Park... > Who says I have a one track mind? > > http://www.paulbutcher.com/ > LinkedIn: http://www.linkedin.com/in/paulbutcher > Skype: paulrabutcher > > Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel > http://pragprog.com/book/pb7con > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
