Hi Bruce,
It looks like your namespace only implements an interface, rather than
extending a class.  You need an ":extends..." line in your (:gen-
class...) to set the concrete base class.
-Stuart Sierra

On May 7, 12:26 pm, gun43 <bg-561...@versanet.de> wrote:
> I am having trouble calling a superclass implementation from an
> overridden method. I have read the documentation for gen-
> class :exposes-methods and looked at the examples on github. When I
> examine the class file, I find no local method for the exposed method.
> Here are the relevant code fragments and the error message produced
> when I call the overridden method.
>
> Any suggestions?
>
> (ns stackcalc.cimpl.StackCalcGUI
>         (:import
>                 (javax...)
>                 (java...)
>                 (stackcalc.cimpl StackCalcGUI))
>         (:gen-class
>                 :implements [stackcalc.common.IStackCalcGUI]
>                 :constructors {[stackcalc.common.IStackCalc][]}
>                 :state state
>                 :init init
>                 :exposes-methods {setVisible superSetVisible}
>                 :methods [#^{:static true} [newGUI
>                                 [stackcalc.common.IStackCalc]   
> stackcalc.common.IStackCalcGUI]]
>         ))
>
> (defn -setVisible
>         "Make this GUI visible (true) or invisible (false)."
>         [this #^Boolean/TYPE visible]
>         (.superSetVisible this visible))
>
> Exception in thread "AWT-EventQueue-0"
> java.lang.IllegalArgumentException: No matching method found:
> superSetVisible for class stackcalc.cimpl.StackCalcGUI
>         at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:50)
>         at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
>         at stackcalc.cimpl.StackCalcGUI$_setVisible__179.invoke
> (StackCalcGUI.clj:234)
>
> Bruce
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to