On Feb 14, 2014, at 6:57 AM, [email protected] wrote: > I'm having a small issue using load-namespace from a bcrepl session, to load > namespaces, and use functions, from within my project. I had a play with the > cemerick's sample project, and successfully managed to load (and use) the > cljscript namespace within that project: > > https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample > > When attempting to setup a bcrepl on an existing cljs project I'm working on, > I managed to interact with the browser from the repl (i.e. sending alerts, > adding nodes to the dom etc), but I didn't manage to load and use any of the > namespaces defined within the project. When attempting to run a function > within a namespace I get the following error:
I am not sure I completely understand your issue, but I recently started using ClojureScript and the browser REPL via Austin, and learned the following the hard way: By dutifully following the sequence of steps described in "browser-connected-repp-sample" README, one gets to steps 4 and 5: (Step 4) Turn your Clojure REPL into a ClojureScript REPL tied to that REPL environment with (cemerick.austin.repls/cljs-repl repl-env) (Step 5) Now that the ClojureScript REPL is ready, you need to load http://localhost:8080, or reload it if you brought it up before the REPL environment was created... At this point, my nrepl session looks something like this: Browser-REPL ready @ http://localhost:61994/7619/repl/start Type `:cljs/quit` to stop the ClojureScript REPL nil cljs.user=> And sure enough, you can do things like (js/alert "Salut!") But, this is not in your project's namespace, if your project namespace is example.core, switch to that via (in-ns 'example.core) Your (browser) REPL prompt should change to example.core=> And now you can call functions defined/visible within this namespace, interact with your vars, etc. Perhaps/hopefully I am the only one to get stuck on this basic step, but I did :-( HTH Don -- 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.
