Undo send! Undo! Sigh...

It's GWT version 2.3.0.


On Wed, May 18, 2011 at 3:08 PM, Isaac Truett <itru...@gmail.com> wrote:

> I'm at a lost to explain this JavaScriptException that occurs when trying
> to parse a date. It works perfectly in DevMode, but once compiled I get this
> error:
>
> (-:-) 2011-05-18 14:57:35,044 [FATAL] Uncaught Exception:
> com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read
> property 'com_google_gwt_i18n_client_DateTimeFormat_patternParts' of
> undefined stack: TypeError: Cannot read property
> 'com_google_gwt_i18n_client_DateTimeFormat_patternParts' of undefined at
> com_google_gwt_i18n_client_DateTimeFormat_$parse__Lcom_google_gwt_i18n_client_DateTimeFormat_2Ljava_lang_String_2ILjava_util_Date_2ZI
> (
> http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html:9178:81<http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html>)
> at
> com_google_gwt_i18n_client_DateTimeFormat_$parse__Lcom_google_gwt_i18n_client_DateTimeFormat_2Ljava_lang_String_2ZLjava_util_Date_2
> (
> http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html:9164:19<http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html>)
> at
> com_google_gwt_i18n_client_DateTimeFormat_$parse__Lcom_google_gwt_i18n_client_DateTimeFormat_2Ljava_lang_String_2Ljava_util_Date_2
> (
> http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html:9157:10<http://127.0.0.1:8888/client/272AD16AB821250FE07C8B73F61BB364.cache.html>
> )
>
>
> The offending JS is the for loop in the following snippet.
>
> function
> com_google_gwt_i18n_client_DateTimeFormat_$parse__Lcom_google_gwt_i18n_client_DateTimeFormat_2Ljava_lang_String_2ILjava_util_Date_2ZI(this$static,
> text, start, date, strict){
>   var abutPass, abutPat, abutStart, cal, count, i, parsePos, part, s;
>   cal = new com_google_gwt_i18n_client_impl_DateRecord_DateRecord__V;
>   parsePos =
> com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2ILcom_google_gwt_lang_Array_2Lcom_google_gwt_lang_Array_2(com_google_gwt_lang_ClassLiteralHolder__13I_1classLit,
> {41:1, 45:1}, -1, [start]);
>   abutPat = -1;
>   abutStart = 0;
>   abutPass = 0;
>   for (i = 0; i <
> java_util_ArrayList_$size__Ljava_util_ArrayList_2I(this$static.com_google_gwt_i18n_client_DateTimeFormat_patternParts);
> ++i) {
>     part =
> com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2ILjava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.com_google_gwt_i18n_client_DateTimeFormat_patternParts,
> i), 85);
>     if (part.com_google_gwt_i18n_client_DateTimeFormat$PatternPart_count >
> 0) {
>       if (abutPat < 0 &&
> part.com_google_gwt_i18n_client_DateTimeFormat$PatternPart_abutStart) {
>         abutPat = i;
>         abutStart = start;
>         abutPass = 0;
>       }
>
>
> The stupid part is that if I try to reduce this to a minimal case, the
> error disappears. I've compared the JS produced by the failing project and
> the minimal attempt to reproduce and found that this snippet above is
> identical.
>
> While I'm digging deeper, I thought I'd throw this out to you all. Does
> anyone have any idea what could cause this$static to be undefined in web
> mode but work properly in DevMode?
>
> Thanks.
> Isaac
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to