The point of that method being protected is that under normal circumstances you don't want to be able to add handlers to a widget that's not capable of firing them in the first place. So a widget subclass creates addFooHandler(), then uses this method internally.
Are you saying you want to add a custom event handler to a widget, then force that widget to fire the event from external code? Sounds like it wants to be a subclass. Le 9 novembre 2010 01:56, cokol <eplisc...@googlemail.com> a écrit : > why is com.google.gwt.user.client.ui.Widget.addHandler(H, Type<H>) > protected? in case I want to fire a custom event on a widget so that > the widget is not aware of custom event handler, it makes it difficult > to manage. > > thanks > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors