Re: Calling apply on java methods

2010-05-12 Thread Aravindh Johendran
On May 11, 1:39 pm, Alexandre Patry wrote: > I am trying to call a java method using apply, like : > > (apply .println [System/out "hello" "world"]) > > But I get an error: "Unable to resolve symbol: .println in this context" > > Am I missing something? The apply method takes a Clojure function

Re: Calling apply on java methods

2010-05-12 Thread Aravindh Johendran
On May 11, 1:39 pm, Alexandre Patry wrote: > I am trying to call a java method using apply, like : > > (apply .println [System/out "hello" "world"]) > > But I get an error: "Unable to resolve symbol: .println in this context" > > Am I missing something? The semantics (meaning of the syntax/code)

Re: Calling apply on java methods

2010-05-11 Thread Michael Gardner
On May 11, 2010, at 12:39 PM, Alexandre Patry wrote: > I am trying to call a java method using apply, like : > > (apply .println [System/out "hello" "world"]) > > But I get an error: "Unable to resolve symbol: .println in this context" > > Am I missing something? Unfortunately, Java methods ar

Re: Calling apply on java methods

2010-05-11 Thread Stuart Halloway
For now, the idiomatic way to do this is to use the shorthand anonymous form: (apply #(.println %) ... ) Of course the example of printing to System.out is fairly well covered with Clojure API fns anyway... Stu I am trying to call a java method using apply, like : (apply .printl

Re: Calling apply on java methods

2010-05-11 Thread Alexandre Patry
Le 2010-05-11 13:45, Heinz N. Gies a écrit : On May 11, 2010, at 19:39 , Alexandre Patry wrote: I am trying to call a java method using apply, like : (apply .println [System/out "hello" "world"]) But I get an error: "Unable to resolve symbol: .println in this context" Am I missing someth

Re: Calling apply on java methods

2010-05-11 Thread Heinz N. Gies
On May 11, 2010, at 19:39 , Alexandre Patry wrote: > I am trying to call a java method using apply, like : > > (apply .println [System/out "hello" "world"]) > > But I get an error: "Unable to resolve symbol: .println in this context" > > Am I missing something? Apply only works on clojure met

Calling apply on java methods

2010-05-11 Thread Alexandre Patry
I am trying to call a java method using apply, like : (apply .println [System/out "hello" "world"]) But I get an error: "Unable to resolve symbol: .println in this context" Am I missing something? Thanks, Alex -- You received this message because you are subscribed to the Google Groups "Cloj