A custom event needs to have a TYPE variable to denote the type of the event. For example:
public class LogoutEvent extends Event<LogoutEventHandler>
public static Type<LogoutEventHandler> TYPE = new Type<LogoutEventHandler>();
protected void dispatch(LogoutEventHandler handler)
public com.google.web.bindery.event.shared.Event.Type<LogoutEventHandler> getAssociatedType()
I am just curious about the need to have the TYPE field. Why GWT could not use the class name of the event(in this case LogoutEvent) to denote the type of the event. Only purpose I see of this type is to have it as a key in the map of events and their handlers. I think even the class name could have served as the key in this map.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.