PDA

View Full Version : EventType.ToString() Improvement (for debugging)



klausg
13 Dec 2011, 4:44 AM
Some times you don't know exactly which event to listen for, and the documentation is not always up to date.
So, you set a breakpoint and end up with
EventType@2537, id = 19

Then you have to go through all the EventType instances in Events, and any custom defined events, to find out which event it is.
Why not add a name to the EventType constructor, and a proper toString() impl

Like
public static final EventType Activate = new EventType("Activete");

It will probably take about one hour to do, and I bet it would save GXT developers and especially everyone else a lot of time.

can I get a thumbs up?

Colin Alworth
15 Dec 2011, 10:35 AM
EventType doesn't exist in any of the GXT 3 preview or beta builds - instead GwtEvent is being subclassed for every event, and so the toString will refer to the class itself.

Shawn.in.Tokyo
21 Mar 2012, 1:47 AM
EventType doesn't exist in any of the GXT 3 preview or beta builds - instead GwtEvent is being subclassed for every event, and so the toString will refer to the class itself.

So how do we migtrate?

Specificially I need to create an AppEvent with the constructor AppEvent (file:///Users/family/dev/GXT/gxt-3.0.0-beta4/javadoc/gxt-legacy/com/sencha/gxt/legacy/client/mvc/AppEvent.html#AppEvent(com.google.gwt.event.shared.GwtEvent.Type))(GwtEvent.Type (http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/event/shared/GwtEvent.Type.html?is-external=true)<?> type)

I just don't get, even after carefully reading the javadocs, searching google, and searching these forums; what we are supposed do for the "type" that we pass into the constructor.

I've read every migration to 3.0 guide that I could find.

It's really not clear at all. Is the Legacy mvc package really supposed to work and if so how??