are you sure you don't have an extra space in there? (. createConnection net …) vs. (.createConnection net …)
On Wed, Jul 27, 2011 at 5:38 PM, Anthony Grimes <disciplera...@gmail.com> wrote: > Sorry for the terrible subject line. I couldn't think of an easy way to > describe the problem in a single line. > (def net (node/require "net")) > (defn portal > [port host] (.createConnection net port host)) > (defn -main [& args] ; Note that only one of these -main functions is in the > file at any given time, of course. > (.createConnection net 1337 "localhost")) > (defn -main [& args] > (portal 1337 "localhost")) > (set! *main-cli-fn* -main) > > For some reason, the first -main above works fine but the second doesn't. > When I use the second and try to run it, I get this: TypeError: Cannot read > property 'net' of undefined > Why would my 'portal' function not be able to see 'net', or is that even > what this means? I'm unfamiliar with these JavaScriptish error messages. :< > I have no idea what is causing this. I reviewed the node example in the > sample directory and I don't see what I'm missing. It's odd that it works > fine in > > -- > 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 -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? -- 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