Absolutely.
--
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
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
It's odd that it works fine in the first one but no the second.
You'd think with that post button being so small that it'd be difficult
to... yeah.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
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
Yep, just double checked. No extra spaces.
--
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
have you looked at the generated javascript?
On Wed, Jul 27, 2011 at 5:44 PM, Anthony Grimes disciplera...@gmail.com wrote:
Yep, just double checked. No extra spaces.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
Yeah. To the extent that I can read Javascript, the calls look exactly the
same and it looks fine.
--
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
On Wed, Jul 27, 2011 at 8: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
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:
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
The first argument to Javascript's 'call' is a 'this' argument. All
generated functions are called like this.
--
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
On Wed, Jul 27, 2011 at 9:21 PM, Anthony Grimes disciplera...@gmail.com wrote:
The first argument to Javascript's 'call' is a 'this' argument. All
generated functions are called like this.
If portal.core.net is an instance rather than a class variable then a
null this would explain it not
It looks like main is called the same way. Like I said, my example is not
much different than the one that comes with cljs.
(ns nodels
(:require [cljs.nodejs :as nodejs]))
(def fs (nodejs/require fs))
(def path (nodejs/require path))
(defn file-seq [dir]
(tree-seq
(fn [f] (.isDirectory
On Wed, Jul 27, 2011 at 9:30 PM, Anthony Grimes disciplera...@gmail.com wrote:
It looks like main is called the same way. Like I said, my example is not
much different than the one that comes with cljs.
(ns nodels
(:require [cljs.nodejs :as nodejs]))
(def fs (nodejs/require fs))
(def path
Is it possible that the new function called portal is overwriting the
namespace called portal? Could you try renaming the function called
portal to something else? Like portal2?
On Wed, Jul 27, 2011 at 6:05 PM, Anthony Grimes disciplera...@gmail.com wrote:
That's actually what I thought at
Hah! That was it! You, sir, are one clever fellow. Thank you very much.
--
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
On Wed, Jul 27, 2011 at 9:48 PM, Anthony Grimes disciplera...@gmail.com wrote:
Hah! That was it! You, sir, are one clever fellow. Thank you very much.
Damn. I didn't think of that. In normal Clojure, defn'ing x.y/x
doesn't clobber the Java package named x with a function named x. But
it looks
17 matches
Mail list logo