From time to time I introduce some new code in an existing project that breaks something, but I can't seem to find out what I've broken. The app builds just fine in Eclipse and starts to execute. The GWT server starts to run and the embedded browser window opens but nothing shows up. The server console in Eclipse shows nothing but the standard INFO messages that always show up. If I have the Developer Console open the Results page shows "INFO:Log:initialized" and "INFO:Log:isc.Page is loaded" and that's it. If I remove the lines of code I just added everything is back to normal. How do I debug?
Announcement
Collapse
No announcement yet.
X
-
I've managed to get it down to just one line. If I add this as the first line of onModuleLoad() it stops working. I don't even reference the new dt variable.
DateTime dt = DateTime();
Note that the DateTime class is imported from org.joda.time.DateTime;
PS. Thanks a lot for taking the time to try and help with this.
Comment
-
Start here: http://code.google.com/webtoolkit/do...Emulation.html
If it is a 3rd party library it should be pretty clear from their site whether they are or not, mainly if it doesn't say they are, assume they aren't.
Comment
-
Simple way:
Date now = new Date();
Date lastWeek = new Date(now.getTime() - (7 * msInADay));
It is dealing with time from the epoch so msInADay is 24 * 60 * 60 * 1000, milliseconds in a 24 hour period. You can also use the older Date(year, month, day - 7) depreciated constructors and the .getMonth(), .getYear(), etc... accessors, and then just convert to string.
Comment
Comment