PDA

View Full Version : [FIXED] casting of BaseEvent to GridEvent fails



lovelysystems
16 Sep 2008, 11:16 PM
at com.extjs.gxt.ui.client.widget.grid.GridSelectionModel.handleEvent(GridSelectionModel.java:69)

in the latest svn version you cast to GridEvent before the switch statement. that causes a cast exception.

my BaseEvent that is beeing fired (from RpcProxy onSuccess) is type Refresh (548)

lovelysystems
16 Sep 2008, 11:21 PM
--- ../com.extjs.gxt/user/src/com/extjs/gxt/ui/client/widget/grid/GridSelectionModel.java (revision 852)
+++ ../com.extjs.gxt/user/src/com/extjs/gxt/ui/client/widget/grid/GridSelectionModel.java (working copy)
@@ -66,19 +66,19 @@
}

public void handleEvent(BaseEvent e) {
- GridEvent ge = (GridEvent)e;
+ //GridEvent ge = (GridEvent)e;
switch (e.type) {
case Events.RowMouseDown:
- handleMouseDown(ge);
+ handleMouseDown((GridEvent) e);
break;
case Events.RowUpdated:
- onRowUpdated(ge);
+ onRowUpdated((GridEvent) e);
break;
case Events.Refresh:
refresh();
break;
case Events.ContextMenu:
- onContextMenu(ge);
+ onContextMenu((GridEvent) e);
break;
}
}

darrellmeyer
17 Sep 2008, 7:07 AM
Fixed.