On Wed, Jul 27, 2011 at 9:05 PM, Anthony Grimes <disciplera...@gmail.com> wrote: > That's actually what I thought at first, but the node example that ships > with ClojureScript actually does the same thing (uses a node function > outside of -main and then calls that function from -main) I did and it works > fine. > Here is the generated JavaScript for the failing -main and such: > portal.core.net = cljs.nodejs.require.call(null, "net"); > portal.core.portal = function portal(b, c) { > return portal.core.net.createConnection(b, c) > }; > portal.core._main = function(a) { > cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0); > return portal.core.portal.call(null, 1337, "localhost") > }; > And here is the generated JS for the working -main: > portal.core._main = function(a) { > cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0); > return portal.core.net.createConnection(1337, "localhost") > };
The generated portal function seems to want two arguments (b, c) but it's called with (null, 1337, "localhost"). Should that be happening? Not that that should cause portal.core.net to not resolve. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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