Right you are. Cheers Tim
On Sun, May 23, 2010 at 4:51 PM, Jay Fields <j...@jayfields.com> wrote: > I believe the error message is because there is no apply() method that > takes no arguments, and (.. node getLoad apply this ) is trying to do this > (in java): node.getLoad().apply().this() > > I think you want (.. node getLoad (apply this)) > > Cheers, Jay > > On May 23, 2010, at 4:39 PM, Timothy Washington wrote: > > Hi there, I'm trying to get Java's '*this*' passed as a variable to > clojure's sugared Java integration. All's fine until the end of line 43. > I've tried '*this*' and *(proxy-super)*, on a lamb, but no dice. > > 42 (if (not= (. node getLoad ) nil) ;; Java equivalent - > *if(node.getLoad() != null) { node.getLoad().apply(this); }* > 43 (.. node getLoad apply this ) > 44 ) > > > The errors I get are an *InvocationTargetException* caused by an * > IllegalArgumentException* . > > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:592) > at jline.ConsoleRunner.main(ConsoleRunner.java:69) > Caused by: java.lang.IllegalArgumentException: No matching field found: > apply for class com.interrupt.bookkeeping.cc.node.TLoad (bkell.clj:0) > at clojure.lang.Compiler.eval(Compiler.java:4658) > at clojure.lang.Compiler.load(Compiler.java:4972) > at clojure.lang.Compiler.loadFile(Compiler.java:4939) > at clojure.main$load_script__7405.invoke(main.clj:213) > at clojure.main$script_opt__7442.invoke(main.clj:265) > at clojure.main$main__7466.doInvoke(main.clj:346) > at clojure.lang.RestFn.invoke(RestFn.java:413) > at clojure.lang.Var.invoke(Var.java:359) > at clojure.lang.AFn.applyToHelper(AFn.java:173) > at clojure.lang.Var.applyTo(Var.java:476) > at clojure.main.main(main.java:37) > ... 5 more > Caused by: java.lang.IllegalArgumentException: No matching field found: > apply for class com.interrupt.bookkeeping.cc.node.TLoad > > > Is there a way to get this done? > > > Thanks all > Tim > > > -- > 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 > > > -- > 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<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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