Re: Beginner: let with Java object

2017-05-26 Thread Christopher Howard
I restarted the Emacs CIDER REPL, and now it seems to work fine. Maybe I just don't understand how to use this CIDER REPL properly. On 05/26/2017 07:58 AM, Gary Trakhman wrote: > There shouldn't be a difference, I would suspect a typo in your file. > > The error 'ClassCastException java.awt.image

Re: Beginner: let with Java object

2017-05-26 Thread Gary Trakhman
There shouldn't be a difference, I would suspect a typo in your file. The error 'ClassCastException java.awt.image.BufferedImage cannot be cast to clojure.lang.IFn tutorial.core/-main (core.clj:11)' would lead me to look for things like '(img)' where the object ends up in call position of the s-e

Beginner: let with Java object

2017-05-26 Thread Christopher Howard
When I run tutorial.core> (let [img (new-image 32 32)] (set-pixel img 10 10 cyan) (show img)) from the REPL, this returns a javax.swing.JFrame object, and displays the frame and image as expected. However, if put the same in (defn -main "Generates image." [& args] (let [img (new-image 32 3