Sunday, August 31, 2014

Re: GWT using SDM throws error at app startup

My bad.  Somehow I almost convinced myself that GWT was wrapping my 'view' variable with a getter called getView that I didn't see what the stack trace was really telling me. (If I would have called my variable x this would have been obvious.)  Yes you are right there was a case where a widget that does have a getView method could be called at startup where the instance is null.  I have corrected this and all works well.  I had tried to load the JS file in notepad++ but it's so large it crashed the editor, thanks for the debugging tips & link to the Chrome shortcuts I will check this out as well. 

-Dave
 


On Sun, Aug 31, 2014 at 3:43 AM, Jens <jens.nehlmeier@gmail.com> wrote:
The stack trace says the error is inside setBookingSheetRowData().

But just don't be afraid to look at the JS code. Open Chrome Dev Tools, go to the sources tab, open adloader-0.js (and wait a bit as it is maybe a large file), hit ctrl + g and enter the line numbers of the stack trace. For setBookingSheetRowData() it is line number 104761 and for $getView it is 31671. The JS code will look relatively similar to your Java code, as GWT does not do any optimizations.
Then you can set a breakpoint to see what is going on. You can also set a breakpoint on "java" level by going to the sources tab, hit ctrl + o to open LoadAdsPrepareGridPresenter.java provided by source maps and then set a breakpoint for view.setBookingSheetRowData(model.getGridBookingSheetRowModels());


-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/1lsSTQluIxE/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--
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