Java says drawString while Clojure says drawstring. The compiler may be 
using introspection to find that method, and thus will not give you a 
compile-time message about the mismatch. I think you could avoid the 
introspection by using the "graphics" method argument instead of the "g2" 
variable, which isn't type hinted. Not finding .drawstring it will throw an 
exception. If AWT calls back on a thread other than your REPL thread then 
you might not notice the exception. Long story short, it can help to add 
try/catch. Then what to do in the catch? Log a message. println might or 
might not work, depending on the REPL and the threading. If println does 
not help then you can either open a file and write to it, or you might as 
well use a real logging library, e.g., clojure.tools.logging in conjunction 
with one of the Java libraries it deals with, such as Logback. Setting up 
logging in Java is tedious but very worth-while.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to