How to debug "TypeError: 'undefined' is not an object (evaluating 'c.gwtOnLoad')"?

571 views
Skip to first unread message

Patrick May

unread,
May 30, 2014, 11:47:19 AM5/30/14
to google-we...@googlegroups.com
While trying to get a widget to display in a div, I'm getting this error:

[Error] TypeError: 'undefined' is not an object (evaluating 'c.gwtOnLoad')
G (ui.nocache.js, line 2)
onScriptLoad (ui.nocache.js, line 16)

What is the best way to figure out exactly what is going on in this case?

Jens

unread,
May 30, 2014, 1:15:18 PM5/30/14
to google-we...@googlegroups.com
Looks like a Nullpointer. Maybe your div isn't available yet? In general compile with PRETTY style so the JavaScript methods have similar names as your Java code. Then you Chrome Dev Tools and stop on any uncaught exception.

But if its the RootPanel.get("ui") thing then I would guess RootPanel.get("ui") might return null. Make sure your "ui" container is in the DOM at the time your GWT app starts.

-- J.

Patrick May

unread,
May 30, 2014, 1:27:04 PM5/30/14
to google-we...@googlegroups.com
Thanks, I'll make sure to use PRETTY.
 
Reply all
Reply to author
Forward
0 new messages