I suspect there is a bug in TreeListenerCollection.java.
I have two selection listeners on a spesific Tree. When the event arrives
the first listener, I remove the listener from within the treelistener
itself. Like:
public void onTreeItemSelected(TreeItem item) {
..
..
myTreeWidget.getTree().removeTreeListener(this);
}
The next treelistner is then never fired, until I click again.
I guess the problem lays in me removing from the listener arraylist before
all the listeners are fired. I changed the
TreeListenerCollection.fireItemSelected method to this (also applied to
fireItemStateChanged):
public void fireItemSelected(TreeItem item) {
TreeListenerCollection clone = (TreeListenerCollection)this.clone();
for (TreeListener listener : clone) {
listener.onTreeItemSelected(item);
}
}
Which solved the problem.
-Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---