Hi, all

I'm trying to use clojurescript compiled to nodejs. I ran into a problem with nodejs Buffer class, which doesn't have a namespace.

I tried different ways to refer Buffer:

(def b (Buffer. 1))
compiled to:
b = new mynamespace.Buffer(1)
this leads to an undefined error on runtime

If I use it under cljs.nodejs namespace
(require cljs.nodejs :as node)
(def b (node/Buffer. 1))
it will be compiled to:
b = new cljs.nodejs.Buffer(1)
But still got error because I didn't see Buffer registered into cljs.nodejs like process or other module.

So how can I refer to such nodejs class like Buffer which doesn't have a namespace ?

--
Sun Ning
Software developer
Nanjing, China (N32°3'42'' E118°46'40'')
http://about.me/sunng/bio

--
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

Reply via email to