onClick problem between latest GWT 1.4 RC1 problem with googlemaps_gwt_2_1_4___4gwt1.4.jar

6 views
Skip to first unread message

searchHouse

unread,
Jun 2, 2007, 12:25:39 PM6/2/07
to Google Web Toolkit, agla...@gmail.com
I just downloaded the latest GWT 1.4 RC1 and upgraded to Aglaforge's
googlemaps_gwt_2_1_4___4gwt1.4.jar as well.

Everything worked fine in the previous versions, but once I upgraded,
GWT in IE hosted mode threw the following exception when I interact
with any of the infowindows in the map:

com.google.gwt.dev.shell.HostedModeException: Calling method
'onClick': JavaScript undefined, expected
com.mapitz.gwt.googleMaps.client.JSObject
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:101)
at
com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:
57)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:
119)
at
com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:
150)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
293)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
196)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native
Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:
2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:689)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:550)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:321)

In hosted mode, some markers are not able to receive the onClick
events as well....

However, everything works fine in web mode. Anyone else encountered
the same issue?

mP

unread,
Jun 2, 2007, 8:00:53 PM6/2/07
to Google Web Toolkit
I think i had a similar problem and found that one of my jsni
functions(methods) was returning undefined rather than null.

aglaforge

unread,
Jun 3, 2007, 2:19:10 AM6/3/07
to Google Web Toolkit
Could you post a short piece of sample code to reproduce the problem?
I'd be happy to debug.

Kind Regards,

A. Laforge

On Jun 2, 9:25 am, searchHouse <chueny...@gmail.com> wrote:
> I just downloaded the latest GWT 1.4 RC1 and upgraded to Aglaforge's
> googlemaps_gwt_2_1_4___4gwt1.4.jar as well.
>
> Everything worked fine in the previous versions, but once I upgraded,
> GWT in IE hosted mode threw the following exception when I interact
> with any of the infowindows in the map:
>
> com.google.gwt.dev.shell.HostedModeException: Calling method
> 'onClick': JavaScript undefined, expected
> com.mapitz.gwt.googleMaps.client.JSObject
> at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:101)
> at

> com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.­java:

Reinier Zwitserloot

unread,
Jun 19, 2007, 7:06:30 PM6/19/07
to Google Web Toolkit
Yup. Well, sort of, for clicking on PushButtons (those are new in
GWT1.4, I believe). The click does work, and the exact error is in the
keyboard listener.. while I'm not actually hitting any keys.

There is no error in safari itself (and I'm developing on a mac, so my
version of hosted mode is a safari variant), so it looks like a very
similar situation.

Here's the full dump, which is similar, but different:

[ERROR] Uncaught exception escaped
com.google.gwt.dev.shell.HostedModeException:
invokeNativeInteger(@com.google.gwt.user.client.impl.DOMImpl::eventGetKeyCode(Lcom/
google/gwt/user/client/Event;)): JavaScript undefined, expected
java.lang.Integer
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:101)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
233)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:
97)
at
com.google.gwt.user.client.impl.DOMImpl.eventGetKeyCode(DOMImpl.java:
80)
at com.google.gwt.user.client.DOM.eventGetKeyCode(DOM.java:435)
at
com.google.gwt.user.client.ui.CustomButton.onBrowserEvent(CustomButton.java:
577)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1211)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:
1194)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1161)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)

Reinier Zwitserloot

unread,
Jun 19, 2007, 7:11:10 PM6/19/07
to Google Web Toolkit

qpid

unread,
Jun 25, 2007, 10:21:55 AM6/25/07
to Google Web Toolkit
Hi,

i am using the googlemaps_gwt_2_1_4 on linux and get the same
exception in host mode. Is there a workaround or a svn version which
solves the problem?

best regards
qpid

On 20 Jun., 01:11, Reinier Zwitserloot <reini...@gmail.com> wrote:
> Referenced this on -Contributors here:
>

> http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse...

blizzard

unread,
Jun 29, 2007, 4:37:24 PM6/29/07
to Google Web Toolkit
I am getting the same thing on Windows XP with googlemaps 2.1.4 and
gwt 1.4

Aglaforge here is the code I am using to get the error:

public void addMarkersToMap(ArrayList rides)
{
for (int i = 0; i < rides.size(); i++)
{
ArrayList routepts = ((Ride) rides.get(i)).getRoute();
if (routepts.size()<0)
{
return;
}

GMarker marker = new GMarker(new GLatLng(((LatLon)
routepts.get(0)).getLat(), ((LatLon) routepts.get(0)).getLon()));
GMarkerEventManager markerEventManager =
GMarkerEventManager.getInstance();
markerEventManager.addOnClickListener(marker, new
MarkerClickListener((Ride)rides.get(i)));
rideMarkers.add(marker);
}

gmaps.addOverlay(rideMarkers);
}

private class MarkerClickListener implements
GMarkerEventClickListener
{
Ride ride;
public MarkerClickListener(Ride _ride)
{
ride = _ride;
}

public void onClick(GMarker marker)
{
RideInfoWindow window = new RideInfoWindow(ride);
marker.openInfoWindow(window);
}

public void onDblClick(GMarker marker)
{
// TODO Auto-generated method stub

}

}

Hopefully I have included enough code to make it useful.

My stack trace is identical to searchHouse's.

Thanks
blizzard

Reply all
Reply to author
Forward
0 new messages