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