Saturday, August 30, 2014

Re: GWT using SDM throws error at app startup

GWT often (if not always) transforms methods that are not overridden into static methods. Such static methods begin with a $ sign.

In your stack trace you can see Unknown.$getView is causing the exception with message "Can not read property 'view' of undefined". That basically means in your Java code you have called null.getView() because GWT transforms this into something like $getView(instance) { return instance.view; } with instance being "undefined" (= null).

So it is either a bug in your app which can cause NullPointer exceptions or you have found a very rare case which causes the GWT compiler to produce wrong JS. 

-- J.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment