View Full Version : Please please please add typed listeners...
ikayzo
6 Oct 2008, 3:19 PM
All widget classes really need typed listeners (e.g. addClickListener() instead of the generic addListener()). This is so fundamental that I can't believe it's not there. Without real listener types you have no idea what to expect from widgets and you have to guess or hunt around. If you look at the GWT core APIs for guidance you'll see that they are very consistent in providing listener interfaces and adapters where needed for convenience.
Adding these typed listener methods also gives you a place to add proper documentation on what they do.
Pat
darrellmeyer
16 Oct 2008, 9:01 AM
Adding typed listeners to all components for all events might not be impracticable due to the sheer number of events components fire. If there are particular places you would like to see typed listeners, let me know, and we can see about adding them.
Without real listener types you have no idea what to expect from widgets and you have to guess or hunt around.Every component that fires events, documents what events it fires and what fields are relevant to that event. There is no need to guess or to hunt around.
rlaferla
11 Dec 2008, 7:50 AM
I think a page in the help center or blog about events would be helpful. If you've been using GWT for a while you may not realize that what's obvious to you is not obvious to everyone.
Perhaps cover some common widgets like Button, TextBox and Grid and common events in that page. There is such a page in the help center on "Selecting" but it needs to be expanded.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.