That would probably explain it. $wnd.event is a special field I think, and if you're manually setting it to a String where someone else expects it to be an Event Object, that could definite explain the cast problem.
On Tue, May 12, 2009 at 2:50 PM, mlgm <michael.gengenb...@t-online.de>wrote: > > Scott, > > thanks for the answer, I was giving up my hope! > > I did the debugging you asked for and from what I found, I was able to > find the problem and a workaround myself :-). I'm not sure though if > it should work as it was before. At least with Firefox on Linux it > did, but I'm no browser and JavaScript expert. > > What happened is this: I'm trying to build an application, where the > GWT module should react on an outside parameter. As a possibility for > doing this, I had found the following solution on the Internet. First, > I created a little JavaScript inside the host page (i.e. a host > servlet) with a variable for the parameter: > > <script language="javascript"> > var event="aa00aa00aa00aa00aa01"; > </script> > > Then this variable is read from inside the GWT module by using a small > native JavaScript method: > > public native String getEventRID()/*-{ > return $wnd.event; > }-*/; > > The problem now seems to be, that I called my variable "event" (as in > performance). If I change the variable name to something else, it > works. As I said, I'm more of a Java expert and have nearly no > JavaScript knowledge and don't know if I'm not allowed to create a > variable named "event", at least in Internet Explorer. BTW, I tested > it with IE6 and IE7, but not IE8. > > In case you might want to analyze this further, here are the debugging > values: > > In IDispatchImpl.callMethod() > > cl = com.google.gwt.dev.shell.compilingclassloa...@ea5140 > jthis = null > params = [VT_BSTR{aa00aa00aa00aa00aa01}] > method = static boolean com.google.gwt.user.client.DOM.previewEvent > (com.google.gwt.user.client.Event) > > In SwtOleGlue.convertVariantsToObjects() > > i = 0 > > Thanks again and GWT rocks! > > Best wishes > > Michael > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---