Is there a way for a class to implement more than one ValueChangeHandler? I thought I could do the following
public class Foo extends Composite implements ValueChangeHandler<ValueTypeA>, ValueChangeHandler<ValueTypeB> { public void onValueChange( ValueChangeEvent<ValueTypeA> event ) { System.out.println("Im interested in events of type A, and I got one"); } public void onValueChange( ValueChangeEvent<ValueTypeB> event ) { System.out.println("Im interested in events of type B, and I got one"); } } When attempting this though, you get an error on the methods of: Method onValueChange(ValueChangeEvent<ValueTypeA>) has the same erasure onValueChange(ValueChangeEvent<I>) as another method in type Foo On the class, as of GWT 1.7, you get the error: The interface ValueChangeHandler cannot be implemented more than once with different arguments: ValueChangeHandler<ValueTypeA> and ValueChangeHandler<ValueTypeB> There errors obviously state that this cannot be done, and I understand why, but is there a clever way for a class to be able to listen to both types of change events? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---