cljsbuild 0.2.2 build failure
This gist https://gist.github.com/3019801 shows a lein cljsbuild failure with the error: Could not locate clojure/instant__init.class or clojure/instant.clj on classpath Does anybody have any idea why this would be happening and what to do to fix it? Thanks, -e -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
testing framework for clojurescript?
Hi folks, I'm looking for people's experience and best-practices writing tests for clojurescript apps. Have folks been using Google Closure's test functions? Anybody tried integrating Jasmine? Any other approaches?What I'd love is something like midje for a more BDD approach... Thanks, -Eric -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
How do I add goog.ui.MenuItem or goog.ui.Option items to goog.ui.Select in clojurescript?
Here's my clojurescript function: (defn make-select [elem-id] (let [select (goog.ui.Select. Heading) select-elem (d/element (keyword (str div# elem-id)))] (.addItemAt select (goog.ui.MenuItem. Item 1) 0) (.addItem select (goog.ui.Option. Item 2)) (.render select select-elem) select-elem)) When you add the results of a calling the above function as: (make-select :channel) to the DOM, it produces the following HTML in the browser: div id=channel div class=goog-inline-block goog-menu-button title= role=button style=-webkit-user-select: none; tabindex=0 aria- haspopup=true aria-pressed=false aria-expanded=false aria- activedescendant= div class=goog-inline-block goog-menu-button-outer-box div class=goog-inline-block goog-menu-button-inner-box div class=goog-inline-block goog-menu-button-caption Heading /div div class=goog-inline-block goog-menu-button-dropdown nbsp; /div /div /div /div /div So, where are the MenuItems or Options? I can't figure out what to do to get the items to be added! The generated Javascript looks a lot like the code in the demo at: http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/select.html Any help greatly appreciated. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: How do I add goog.ui.MenuItem or goog.ui.Option items to goog.ui.Select in clojurescript?
Well, I figured it out. It was working just fine. The problem was that the Options/MenuItems are added elsewhere to the dom. I didn't have the css loading so I just didn't notice that they were at the very bottom of the screen. On Oct 10, 9:25 pm, Eric Harris-Braun zippy.314@gmail.com wrote: Here's my clojurescript function: (defn make-select [elem-id] (let [select (goog.ui.Select. Heading) select-elem (d/element (keyword (str div# elem-id)))] (.addItemAt select (goog.ui.MenuItem. Item 1) 0) (.addItem select (goog.ui.Option. Item 2)) (.render select select-elem) select-elem)) When you add the results of a calling the above function as: (make-select :channel) to the DOM, it produces the following HTML in the browser: div id=channel div class=goog-inline-block goog-menu-button title= role=button style=-webkit-user-select: none; tabindex=0 aria- haspopup=true aria-pressed=false aria-expanded=false aria- activedescendant= div class=goog-inline-block goog-menu-button-outer-box div class=goog-inline-block goog-menu-button-inner-box div class=goog-inline-block goog-menu-button-caption Heading /div div class=goog-inline-block goog-menu-button-dropdown nbsp; /div /div /div /div /div So, where are the MenuItems or Options? I can't figure out what to do to get the items to be added! The generated Javascript looks a lot like the code in the demo at:http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/se... Any help greatly appreciated. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: goog.net.cookies with clojurescript?
Thanks Jonathan! That's it exactly. I had seen goog.net.cookies (lowercase) and didn't realize it was an object on which to make the set call. I thought in was another namespace in which to make the function call, thus I had been writing: .. (:use [goog.net.cookies :as cookie]) ... and was calling: (cookie/set name content) which is what was failing! Thanks again. -e On Oct 6, 6:38 am, Jonathan Fischer Friberg odysso...@gmail.com wrote: I managed to do it. The problem is that we need to use the function set in a goog.net.Cookies object. There is already such an object, which is called goog.net.cookies, see the bottom of the source file: /** * A static default instance. * @type {goog.net.Cookies} */ goog.net.cookies = new goog.net.Cookies(document); Therefore we need to do (ns cookies (:require [goog.net.cookies :as cks])) (defn ^:export setcookie [] (.set goog.net.cookies name content -1)) Which will properly set the cookie (see attachment) On Wed, Oct 5, 2011 at 11:24 PM, Eric Harris-Braun zippy.314@gmail.comwrote: Has anybody successfully used cookies in clojurescript with goog.net.cookies? I keep getting this error: 'this.isValidName' [undefined] is not a function (Safari) or Uncaught TypeError: Object [object DOMWindow] has no method 'isValidName' (Chrome) when I try to set a cookie via goog.net.cookies.set. Thanks -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en cookie_small.png 39KViewDownload -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
goog.net.cookies with clojurescript?
Has anybody successfully used cookies in clojurescript with goog.net.cookies? I keep getting this error: 'this.isValidName' [undefined] is not a function (Safari) or Uncaught TypeError: Object [object DOMWindow] has no method 'isValidName' (Chrome) when I try to set a cookie via goog.net.cookies.set. Thanks -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
clojurescript closure problem?
Check out this little bit of code: (doseq [hid [a b c]] (goog.dom.appendChild (goog.dom.$ some-element-id) (goog.dom.createDom div (.strobj {id hid}) (str Test-hid))) (goog.events.listen (goog.dom.$ hid) goog.events.EventType.CLICK, (fn [e] (js/alert hid What I want it do to is add in a few div's that when clicked on simply alert with the value their id value. That doesn't actually happen, what happens is that they all alert with the c ie. the last value in the list. This code, on the other-hand works: (defn hidfn [hid] (fn [e] (js/alert hid)) ) (doseq [hid [a b c]] (goog.dom.appendChild (goog.dom.$ the-receptor) (goog.dom.createDom div (.strobj {id hid}) (str Test-hid))) (goog.events.listen (goog.dom.$ hid) goog.events.EventType.CLICK, (hidfn hid))) Shouldn't the clojurescript compiler detect that the usage of hid in the function in the first case requires the creation of an anonymous function to close around that value? Why do I have to do it manually? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en