Re: Problem importing JOptionPane from a string evaluated by load-string

2010-09-10 Thread Paul D. Fernhout
On 9/10/10 9:03 AM, Laurent PETIT wrote: Got it. You cannot invoke (import) (or (ns)) from within the function definition. The function is already being evaluated, and it's "too late". This works fine for me: (do (import '(javax.swing JOptionPane)) ((fn [] (println "Hello World")

Problem importing JOptionPane from a string evaluated by load-string

2010-09-10 Thread Paul D. Fernhout
I'm just trying out Clojure a bit, so this may be an obvious simple thing I'm misunderstanding. This code in the test file below allows editing a Clojure function that is updated when an "Update Code" button is pressed, with the new value connected to a GUI button "Click Me!" as a proxy Action