Hello!
On Tue, Sep 1, 2009 at 5:44 PM, Sir Diddymus<[email protected]> wrote:
> Hi all,
>
>> (defmacro RunQt [args & body]
>> `(
>> (try
>> (QApplication/initialize (into-array [~args]))
>> (catch RuntimeException e# (println e#)))
>> ~...@body
>> (QApplication/exec)))
(defmacro RunQt [args & body]
`(do ; <= here is the error
(try
(QApplication/initialize (into-array [~args]))
(catch RuntimeException e# (println e#)))
~...@body
(QApplication/exec)))
Without the 'do the form was compiled as a function invocation, and
thus it tries to call the return value of the try form (which is nil)
only once all args are computed (ie when you close the window).
Christophe
--
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---