Hi,
Am 10.02.2010 um 21:05 schrieb Brian Wolf:
> As a beginner, I tried running the first example,changing namespaces
> or not, etc ,and I keep getting
>
> user=> (ns some.Example
>(gen-class))
> nil
> some.Example=> (defn -toString
> [this]
> "HI !")
>
Meikel,
As a beginner, I tried running the first example,changing namespaces
or not, etc ,and I keep getting
user=> (ns some.Example
(gen-class))
nil
some.Example=> (defn -toString
[this]
"HI !")
#'some.Example/-toString
some.Example=> (ns user)
nil
yes,thank you, this looks very helpful
On Feb 9, 3:44 pm, Meikel Brandmeyer wrote:
> Hi,
>
> I wrote up a post:http://tr.im/NwCL
>
> Hope it helps.
>
> Sincerely
> Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
thanks!
--
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
Hi,
Am 09.02.2010 um 18:10 schrieb Аркадий Рост:
> Oh...So to make methods I must declare them in gen-class clause and if
> some function wasn't include in gen-class clause, it wouldn't be a
> method even if it had a prefix from gen-class clause.
> I mean:
> (ns example.class
> (:gen-class
> :
Hi,
I wrote up a post: http://tr.im/NwCL
Hope it helps.
Sincerely
Meikel
--
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 patien
Hi,
I also am confused about gen-class, looking for a pointer to some code
examples.
Thanks,
Brian
??? wrote:
Oh...So to make methods I must declare them in gen-class clause and if
some function wasn't include in gen-class clause, it wouldn't be a
method even if it had a prefix fr
And one more, when and why "methods" should be used? (except main)
--
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 yo
Oh...So to make methods I must declare them in gen-class clause and if
some function wasn't include in gen-class clause, it wouldn't be a
method even if it had a prefix from gen-class clause.
I mean:
(ns example.class
(:gen-class
:prefix pre-
:methods [[method_name1 [... arg types here ...]
Thaks for yor answer. It's really help me with studying.
--
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
Hi,
On Feb 9, 4:22 pm, Аркадий Рост wrote:
> For example:
>
> (ns exaple_class
> (:gen-class))
>
> (defn -main [args*] (...do smth...))
> (defn -method_name1 [args*] (...do smth...))
> (defn- -method_name2 [args*] (...do smth...))
> (def -a 5)
>
> (defn fun1 [args*] (...do smth...))
> (defn-
Hi!
For example:
(ns exaple_class
(:gen-class))
(defn -main [args*] (...do smth...))
(defn -method_name1 [args*] (...do smth...))
(defn- -method_name2 [args*] (...do smth...))
(def -a 5)
(defn fun1 [args*] (...do smth...))
(defn- fun2 [args*] (...do smth...))
(def b 5)
As I understand, in t
Of course! Thanks a lot!
On Dec 11, 7:23 am, "Chris Turner" <[EMAIL PROTECTED]> wrote:
> Not sure about the other info you're looking for, but I think I can help
> explain what's going on. All methods have an extra argument passed in
> representing the object itself (usually called "this").
>
> I
Not sure about the other info you're looking for, but I think I can help
explain what's going on. All methods have an extra argument passed in
representing the object itself (usually called "this").
In your example, what you want is:
(ns p.C (:gen-class :methods [[m [Object] void]]))
(defn -m [thi
I'm trying to generate a Java class from Clojure with gen-class, but
without much success. I've got the following code:
(ns p.C (:gen-class :methods [[m [Object] void]]))
(defn -m [o] (println (.. o getClass getName)))
The signature of the m method is correct:
javap p.C
public class p.C extends
15 matches
Mail list logo