これがばかげた間違いであることを願っていますが、私には見えません。
; OK
=> (filter (fn [x] (= "addItemListener" (.getName x))) (.getMethods javax.swing.JComboBox))
(#<Method public void javax.swing.JComboBox.addItemListener(java.awt.event.ItemListener)>)
; Error
=> (let [combobox (javax.swing.JComboBox. (java.util.Vector. ['a 'b 'c]))]
(.addItemListener combobox
(proxy [java.awt.event.ItemListener] []
(itemStateChanged [item-event] (println (str "selection changed to " (.getSelectedItem combobox)))))
combobox))
java.lang.IllegalArgumentException: No matching method found: addItemListener for class javax.swing.JComboBox (NO_SOURCE_FILE:0)
clojure がaddItemListener
メソッドを見つけられないのはなぜですか?