I also noticed that when I compile the cljs code I get: WARNING: Use of undeclared Var jayq.core/clj->js
On Friday, January 18, 2013 9:56:22 PM UTC-5, Ari wrote: > > Hi, > > Below is the project.clj -- anything stand out? Thanks for the help. > > (defproject sample "0.1.0-SNAPSHOT" > :description "Practice Clojure/Clojurescript app" > :url "" > :license {:name "Eclipse Public License" > :url "http://www.eclipse.org/legal/epl-v10.html"} > :source-paths ["src/clj"] > :dependencies [[org.clojure/clojure "1.4.0"] > [org.clojure/data.xml "0.0.7"] > [org.clojure/data.json "0.2.0"] > [org.clojure/clojurescript "0.0-1450"] > [compojure "1.1.3"] > [enlive "1.0.1"] > [com.cemerick/friend "0.1.3"] > [jayq "2.0.0"] > [crate "0.2.3"] > [waltz "0.1.0-alpha1"] > [com.novemberain/monger "1.4.1"]] > :plugins [[lein-ring "0.7.5"] > [lein-cljsbuild "0.2.9"]] > :cljsbuild {:builds [{:source-path "src/cljs" > :compiler {:output-to > "resources/public/javascripts/app.js" :optimizations :whitespace > :pretty-print true}}] > :repl-listen-port 3000 > :repl-launch-commands {"firefox" ["firefox" :stdout > "stdout.log" :stderr "stderr.log"]}} > :ring {:handler sample.routes/app}) > > > On Friday, January 18, 2013 6:48:31 PM UTC-5, Ilia Ablamonov wrote: >> >> Hello Ari, >> >> >> I've tried to reproduce your case and it works for me. I use the >> following project.clj: >> >> (defproject playground "0.1.0" >> :dependencies [[jayq "2.0.0"]] >> :min-lein-version "2.0.0" >> :source-paths ["src"] >> :plugins [[lein-cljsbuild "0.2.10"]] >> :cljsbuild {:builds >> [{:source-path "src" >> :compiler {:output-to "public/app.js" >> :pretty-print true >> :optimizations :whitespace}}]}) >> >> Maybe something in your project.clj makes difference. Could you plz list >> it? >> >> суббота, 19 января 2013 г., 2:43:43 UTC+4 пользователь Ari написал: >>> >>> The error message was cutoff in my previous post; the error returned is: >>> >>> Uncaught TypeError: Cannot call method 'call' of undefined >>> >>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call(null, >>> cljs.core.ObjMap.fromObject(["\ufdd0'accepts", "\ufdd0'contents", >>> "\ufdd0'converters"], >>> {"\ufdd0'accepts":cljs.core.ObjMap.fromObject(["\ufdd0'edn", >>> "\ufdd0'clojure"], {"\ufdd0'edn":"application/edn, text/edn", >>> "\ufdd0'clojure":"application/clojure, text/clojure"}), >>> "\ufdd0'contents":cljs.core.ObjMap.fromObject(["clojure"], >>> {"clojure":/edn|clojure/}), >>> "\ufdd0'converters":cljs.core.ObjMap.fromObject(["text edn", "text >>> clojure"], {"text edn":jayq.core.mimetype_converter, >>> Uncaught TypeError: Cannot call method 'call' of undefined >>> >>> >>> On Friday, January 18, 2013 3:48:16 PM UTC-5, Ari wrote: >>>> >>>> Hi, >>>> >>>> When I use the jayq <https://github.com/ibdknox/jayq> library to wait >>>> until the page loads (see following code) I get the error below. If I >>>> remove jayq, the code executes correctly. Does anyone know what I'm doing >>>> wrong? Thanks. >>>> >>>> Html: >>>> <!DOCTYPE html> >>>> <html> >>>> <head></head> >>>> <body> >>>> <script type="text/javascript" src=" >>>> https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js >>>> "></script> >>>> <script type="text/javascript">var CLOSURE_NO_DEPS = true;</script> >>>> <script type="text/javascript" src="javascripts/app.js"></script> >>>> </body> >>>> </html> >>>> >>>> >>>> Clojurescript: >>>> >>>> (ns myapp.example >>>> (:use [jayq.core :only [$]]) >>>> (:use-macros [jayq.macros :only [ready]])) >>>> >>>> (ready (js/alert "Hello")) >>>> >>>> Error: >>>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call... >>>> >>>> -Ari >>>> >>> -- 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