What you just said makes sense when you write the listener. I was referring to the situation when you want to remove a listener that was added by default, like this case maybe. I also required this feature to be able to right click on a menu item in swing some other time.
I would have needed this feature to remove all default MouseEnter event listeners, if any, that may be the cause of this behaviour. About the jdk, this could also be the problem, as I was using jdk 1.7.0 IcedTead in Fedora 8. Now in Fedora 9, OpenJDK is promoted, mainly because it's developped by Sun. My next step will be trying you recommendation. Thanks. On Mon, May 26, 2008 at 12:39 AM, Fabio Mancinelli <[EMAIL PROTECTED]> wrote: > > On 25 mai 08, at 23:06, Enygma wrote: > >> I thought of removing every MouseEnter or MouseHover event by removing >> listeners attached to those events for the browser object but I have >> stumbled upon a very weird thing in SWT: There is no getListeners >> method for a Control/Widget. >> >> I googled it and found out that only from 3.4M Eclipse thought of >> adding this method. >> >> The only mechanism orientated in this direction I found is the >> ListenerList class which is for handling listeners but that implies >> that you subclass every control you need to have the getListeners >> method which is very lame. > >> I can not imagine how SWT lived so far without such a basic >> functionality. I know it is not very commonly required to remove a >> listener, but I for one used it a couple of times. >> > Frankly I don't see why such a method would be useful for clients. > If I am a listener I can remove myself by passing 'this' to > removeListener. > And this should be the only thing allowed because, otherwise, I might > randomly remove other > listeners that are not 'this'. > >> Anyway, does anyone have a solution for this or is it just the wrong >> approach? >> >> P.S.: Keep in mind that I am experiencing this anomaly only in Fedora >> 9, from what I see. > > Just to give it a try... Why don't you use the Sun's JDK 1.5? > Maybe it's a bug of OpenJDK 6.0 > > Cheers, > Fabio > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

