views:

151

answers:

1

I made some changes to GWT app without testing it in the client browser. I just now tested it in the browser and now the browser is throwing an error:

"Error: uncaught exception: java.lang.IllegalArgumentException: Widget must be a child of this panel."

How do I figure out why this is being thrown and where to fix it?

I made so many changes in the code between now and last time I tested to figure out where it could possibly be from memory.

Any help would be greatly appreciated.

+1  A: 

This error message is thrown (at least) by an AbsolutePanel if you try to call setWidgetPosition, getWidgetLeft or getWidgetTop with a widget as argument that's not a child of the AbsolutePanel. Maybe you call the method before you attach the widget to the Panel.

For debugging you can try the following:

Run in hosted mode and set a debug pointer on the IllegalArgumentException.

Or if you only can find it in client code. I compile with -style pretty and run it in Firefox with FireBug debugger and set Script to break on errors or track throw/catch.

Hilbrand