[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
I'm not a fan of the experimental package being in GWT trunk. Can we move this to trunk/bikeshed/ and just use the package name we expect it to end up with com/google/gwt/geolocation/? That ensures that we don't have to remove it if this isn't ready for GWT 2.1.1. It also means we don't have to repackage everything when its ready for GWT trunk, which was annoying the last time we moved stuff out of bikeshed. http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
That would work for this package, but other HTML5 stuff involves additions to core GWT classes, unlike the situation we had with cell widgets last time. It seems like it would be tough for stuff in gwt-user to have dependencies on bikeshed, and even tougher to avoid such dependencies while still coming up with a coherent architecture that doesn't make HTML5 feel like it's bolted on the side. We can easily modify a build rule somewhere not to include com.google.gwt.experimental in a release build, if need be. Dan On Fri, Oct 29, 2010 at 2:11 PM, jlaba...@google.com wrote: I'm not a fan of the experimental package being in GWT trunk. Can we move this to trunk/bikeshed/ and just use the package name we expect it to end up with com/google/gwt/geolocation/? That ensures that we don't have to remove it if this isn't ready for GWT 2.1.1. It also means we don't have to repackage everything when its ready for GWT trunk, which was annoying the last time we moved stuff out of bikeshed. http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
If we don't include com.google.gwt.experimental in the release, wouldn't we still break dependencies from gwt-user to the experimental stuff? If we need to modify an existing class with a reference experimental class, we either need to ship the experimental class or we need to create a branch. I'd rather use bikeshed to keep the new stuff separate, and make sure that we don't have any dependencies on existing classes. We can override package protected methods by using a parallel package structure under bikeshed. Otherwise, experimental could create dependencies that are hard to catch. http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/diff/24001/25004 File user/src/com/google/gwt/geolocation/client/Geolocation.java (right): http://gwt-code-reviews.appspot.com/1060801/diff/24001/25004#newcode38 user/src/com/google/gwt/geolocation/client/Geolocation.java:38: * Returns a {...@linnk Geolocation} instance that may be used to obtain the typo @linnk http://gwt-code-reviews.appspot.com/1060801/diff/24001/25004#newcode41 user/src/com/google/gwt/geolocation/client/Geolocation.java:41: * @return a {...@linnk Geolocation} instance typo @linnk http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
Looks good, including heading, which is tricky (GPS-equipped devices return NaN for stationary, as opposed to null for unavailable). (This is a convenient test site, as it returns the raw values: http://benwerd.com/lab/geo.php) Would it be possible to change GeoLocation to Geolocation to conform with W3C usage? http://www.w3.org/TR/geolocation-API/ http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
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
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
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#newcode83 user/src/com/google/gwt/experimental/geolocation/impl/GeoLocationImpl.java:83: var success = function(position) { On 2010/10/28 18:21:15, zundel wrote: 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 I think you just want var success = $entry(function...); and likewise for any place where JS may call into something that may call Java code. In addition to exception handling, this is essential for all the Scheduler methods to work properly. http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
Good point, and in fact the values documented in the W3C geolocation API as 'long' translate to Java 'int': http://www.w3.org/TR/geolocation-API/ http://dev.w3.org/2006/webapi/WebIDL/#idl-long On 2010/10/28 18:21:14, zundel wrote: 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
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
http://gwt-code-reviews.appspot.com/1060801/diff/10001/11003 File user/src/com/google/gwt/experimental/geolocation/impl/GeolocationImpl.java (right): http://gwt-code-reviews.appspot.com/1060801/diff/10001/11003#newcode34 user/src/com/google/gwt/experimental/geolocation/impl/GeolocationImpl.java:34: return isSupported() ? new GeolocationImpl() : null; what purpose do multiple instances serve here? there is only one wnd.navigator.geolocation, why do we need multiple objects to wrap one object? Unless I'm missing something, it looks like these could all be static dispatched. http://gwt-code-reviews.appspot.com/1060801/diff/10001/11003#newcode98 user/src/com/google/gwt/experimental/geolocation/impl/GeolocationImpl.java:98: @com.google.gwt.experimental.geolocation.impl.GeolocationImpl::success(Lcom/google/gwt/experimental/geolocation/Geolocation$Handler;DDDD)( my JNI-JSNI-fu fails me here: ';DDDD' http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
That translates to an arglist of: A Java object of this type: Lcom/google/gwt/experimental/geolocation/Geolocation$Handler; Followed by seven doubles: DDD Followed by four booleans: Followed by a double: D On 2010/10/28 18:55:51, conroy wrote: http://gwt-code-reviews.appspot.com/1060801/diff/10001/11003#newcode98 user/src/com/google/gwt/experimental/geolocation/impl/GeolocationImpl.java:98: @com.google.gwt.experimental.geolocation.impl.GeolocationImpl::success(Lcom/google/gwt/experimental/geolocation/Geolocation$Handler;DDDD)( my JNI-JSNI-fu fails me here: ';DDDD' http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Experimental version of GeoLocation API (issue1060801)
Ah yes, I'm used to seeing far fewer arguments and still find the syntax unpleasant You know a syntax is ugly when a method signature looks like a toddler snuck up and smashed some keys when you weren't looking :P Sorry for the brain fart there. On Thu, Oct 28, 2010 at 3:16 PM, jdou...@basis.com wrote: That translates to an arglist of: A Java object of this type: Lcom/google/gwt/experimental/geolocation/Geolocation$Handler; Followed by seven doubles: DDD Followed by four booleans: Followed by a double: D On 2010/10/28 18:55:51, conroy wrote: http://gwt-code-reviews.appspot.com/1060801/diff/10001/11003#newcode98 user/src/com/google/gwt/experimental/geolocation/impl/GeolocationImpl.java:98: @com.google.gwt.experimental.geolocation.impl.GeolocationImpl::success(Lcom/google/gwt/experimental/geolocation/Geolocation$Handler;DDDD)( my JNI-JSNI-fu fails me here: ';DDDD' http://gwt-code-reviews.appspot.com/1060801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors