The following works - note ActionListener is fully qualified: ----- user=> (.addActionListener (javax.swing.JButton.) (proxy [java.awt.event.ActionListener] [] (actionPerformed [evt] (println "button press")))) nil ----- If I remove the package name I get a NullPointerException:
----- user=> (.addActionListener (javax.swing.JButton.) (proxy [ActionListener] [] (actionPerformed [evt] (println "button press")))) java.lang.NullPointerException (NO_SOURCE_FILE:161) user=> ------ Of course, I haven't imported ActionListener so I wouldn't expect it to evaluate without error - I just wasn't expecting a NullPointerException. Paul -- Iode Software Ltd, registered in England No. 6299803. Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring, Tyne & Wear, DH5 8NE. This message is intended only for the use of the person(s) ("the intended recipient(s)") to whom it is addressed. It may contain information which is privileged and confidential within the meaning of applicable law. If you are not the intended recipient, please contact the sender as soon as possible. The views expressed in this communication may not necessarily be the views held by The Company. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---