Used code for implementing the menu bar and the context menu in my notepad-like text editor so I would say that an AbstractListener would probably be overkill in this particular case. While not as consice as it would be with an AbstractListener I feel it's easier to read in my program. Thanks a lot for the help, I appreciate it!
On Mar 30, 6:55 am, Timothy Pratley <timothyprat...@gmail.com> wrote: > 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 > bindingshttp://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 > acrosshttp://groups.google.com/group/clojure/browse_thread/thread/97a30dbf7... > 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 -~----------~----~----~----~------~----~------~--~---