it depends how often you are pushing stuff onto the EDT. I have a
similar macro called EDT so I can do stuff like (EDT (.setText foo
"bar")) alternatively I would need to type (SwingUtilities/invokeLater
#(.setText foo "bar")) or even (SwingUtilities/invokeLater (fn []
(.setText foo "bar")))
On S
Isn't this a case of wrapping a Java API needlessly?
What's so bad about: (SwingUtilities/invokeLater my-func) ?
-- Aaron
On Sat, Jun 13, 2009 at 5:59 PM, Kevin Downey wrote:
>
> On Sat, Jun 13, 2009 at 2:55 PM, Meikel Brandmeyer wrote:
>> Hi,
>>
>> Am 13.06.2009 um 23:29 schrieb Meikel Brandm
On Sat, Jun 13, 2009 at 2:55 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 13.06.2009 um 23:29 schrieb Meikel Brandmeyer:
>
>> (defmacro get-on-edt
>> [& body]
>> `(get-on-edt* (fn [] ~body)))
>
> Of course ~...@body instead of ~body...
>
> Sincerely
> Meikel
>
>
I know you (Meikel) already fixed i
Hi,
Am 13.06.2009 um 23:29 schrieb Meikel Brandmeyer:
(defmacro get-on-edt
[& body]
`(get-on-edt* (fn [] ~body)))
Of course ~...@body instead of ~body...
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
On Sat, Jun 13, 2009 at 2:02 PM, Wrexsoul wrote:
>
> Now I'm working on some Swing code and came up with these, which are
> obviously going to be useful:
>
> (defmacro do-on-edt [& body]
> `(SwingUtilities/invokeLater #(do ~...@body)))
>
> (defmacro get-on-edt [& body]
> `(let [ret# (atom nil)]
Hi,
Am 13.06.2009 um 23:02 schrieb Wrexsoul:
Now I'm working on some Swing code and came up with these, which are
obviously going to be useful:
And which are partly in clojure.contrib.swing-utils :)
(defmacro do-on-edt [& body]
`(SwingUtilities/invokeLater #(do ~...@body)))
(defmacro get-
Thank you so much for giving us your light, master of the dotted pair
notation ;-)
2009/6/13 Wrexsoul :
>
> Now I'm working on some Swing code and came up with these, which are
> obviously going to be useful:
>
> (defmacro do-on-edt [& body]
> `(SwingUtilities/invokeLater #(do ~...@body)))
>
> (
Now I'm working on some Swing code and came up with these, which are
obviously going to be useful:
(defmacro do-on-edt [& body]
`(SwingUtilities/invokeLater #(do ~...@body)))
(defmacro get-on-edt [& body]
`(let [ret# (atom nil)]
(SwingUtilities/invokeLater #(reset! ret# [(do ~...@body)]