Hi Rayne, As I see it there are three reasons why using AbstractAction is nice: [a] they can be (re)used for buttons/toolbars/menus (including icon and tooltip). [b] they can be disabled/enabled in one place. [c] global key bindings http://groups.google.com/group/clojure/web/global-hotkey.clj
Those benefits are somewhat moot in Clojure seeing you can re-use a function and provide concise constructs with either approach (if reuse is even necessary). So I would say it is entirely a question of preference. I agree ActionListeners have the advantage of being more explicit, and more obvious. I just like the AbstractAction way :) You may have already come across http://groups.google.com/group/clojure/browse_thread/thread/97a30dbf77cf0a70/11cfa154ec30af18 I found it really interesting that Keith implemented and provides the source for a swing app in Java Ruby and Clojure. On Mar 30, 8:02 pm, Rayne <disciplera...@gmail.com> wrote: > Thank you so much! :D You're a life savor. Might I ask a question > though. > > Is there a specific reason for using AbstractListener in place of > ActionListener besides making things much more concise? I tend to use > ActionListener and make menu items more explicit. It's just a personal > preference but if it's /that/ bad practice I'll put an end to it. > > On Mar 30, 2:18 am, Timothy Pratley <timothyprat...@gmail.com> wrote: > > > I made you one:http://groups.google.com/group/clojure/web/popupmenu.clj > > > On Mar 30, 1:01 pm, Rayne <disciplera...@gmail.com> wrote: > > > > I'm one of the ones who /didn't/ come from Java to Clojure. I can only > > > get myself so far looking at Java examples. I need to make a context > > > menu that will pop up when I right click inside of a JEditorPane. I'd > > > appreciate it if anyone could whip me up a simple example of doing > > > something like that in Clojure. > > > > Thanks in advance! > > > > -Anthony --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---