Isn't this supposed to work?
(defn create-layout []
(proxy [java.awt.LayoutManager] []
(addLayoutComponent [name comp]
(println "Called addLayoutComponent"))
(removeLayoutComponent [comp]
(println "Called removeLayoutComponent"))
(preferredLayoutSize [container]
(println "Called preferredLayoutSize"))
(minimumLayoutSize [container]
(println "Called minimumLayoutSize"))
(layoutContainer [container]
(println "Called layoutContainer"))))
user> (def layout (create-layout))
#'user/layout
user> (instance? java.awt.LayoutManager layout)
true
user> (. layout preferredLayoutSize)
; Evaluation aborted. java.lang.IllegalArgumentException: No matching
field found: preferredLayoutSize for class
clojure.proxy.java.lang.Object$LayoutManager (NO_SOURCE_FILE:0)
[Thrown class clojure.lang.Compiler$CompilerException]
I get the same thing for all its methods, when I try to call them
manually and also when I hook it up to a Swing container.
I'd greatly appreciate it if anyone has any insight regarding what is
going on...
Thanks,
-Luke
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---