http://gwt-code-reviews.appspot.com/1060801/diff/1/4
File
user/src/com/google/gwt/experimental/geolocation/impl/GeoLocationImpl.java
(right):

http://gwt-code-reviews.appspot.com/1060801/diff/1/4#newcode39
user/src/com/google/gwt/experimental/geolocation/impl/GeoLocationImpl.java:39:
boolean hasHeading, boolean hasSpeed, double timestamp) {
(see note below regarding exception handling)

http://gwt-code-reviews.appspot.com/1060801/diff/1/4#newcode43
user/src/com/google/gwt/experimental/geolocation/impl/GeoLocationImpl.java:43:
callback.onPositionChanged(new PositionImpl(coords, new Date(
I'm skeptical that we are doing anyone a favor by transforming the
double value into a Date object.

http://gwt-code-reviews.appspot.com/1060801/diff/1/4#newcode83
user/src/com/google/gwt/experimental/geolocation/impl/GeoLocationImpl.java:83:
var success = function(position) {
when calling back from a javascript event, you need to be careful to
catch exceptions and forward them to dev mode.  Otherwise, your java
exceptions will disappear into the ether.

Here's a utility class we use in gwt-google-apis:

http://code.google.com/p/gwt-google-apis/source/browse/trunk/ajaxloader/ajaxloader/src/com/google/gwt/ajaxloader/client/ExceptionHelper.java

http://gwt-code-reviews.appspot.com/1060801/diff/3001/4001
File user/src/com/google/gwt/experimental/geolocation/GeoLocation.java
(right):

http://gwt-code-reviews.appspot.com/1060801/diff/3001/4001#newcode211
user/src/com/google/gwt/experimental/geolocation/GeoLocation.java:211:
public long getMaximumAge() {
sure you want to use long here?  There are penalties in GWT for
emulating long in javascript.

http://gwt-code-reviews.appspot.com/1060801/diff/3001/4001#newcode221
user/src/com/google/gwt/experimental/geolocation/GeoLocation.java:221:
public long getTimeout() {
sure you want to use long here?  penalties in GWT for emulating long in
javascript.

http://gwt-code-reviews.appspot.com/1060801/show

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

Reply via email to