From: Jared E. <jar...@gm...> - 2011-02-04 00:56:17
|
Adding $wnd to new Array() expressions works for every browser but Safari: https://bugs.webkit.org/show_bug.cgi?id=17250 See this post for more information: http://forums.instantiations.com/viewtopic.php?f=11&t=1719&start=15#p6476 According to the previous link, the solution is use a function from the main window (e.g. $wnd.newArray()). Could we add the following function to org.gwtopenmaps.openlayers.public.js.gwt-openlayers.util.js: gwt_openlayers_util.newArray = function(){ return new Array(); } Jared On Feb 3, 2011, at 4:32 AM, Edwin Commandeur wrote: > Hi Alexander, > > That is a really useful improvement. Crazy enough I had never thought > about adding $wnd in a new Array() expression. There is a utility > function in GWT-OL to get around it, but your solution is much simpler > and much more elegant! > > Greetings, > Edwin > > On 3 February 2011 01:06, Alexander Solovets <aso...@gm...> wrote: >> I think I can tell about some tiny improvements here rather than send >> whole file with added 3-4 chars. So the first most important >> improvement - to prepend "new Array()", "new Object()", "new >> Function()" with "$wnd" in JSObjectHelper, then GWT won't break >> 'instanceof' operator =) I was working on let SelectFeature accept >> array of layers, when notice that 'instanceof' was broken. I tried >> JavaScriptObject.createArray() and it didn't work, then I created >> array by myself by native method "new $wnd.Array()". And it has >> succedded! Diggen into GWT-OL a bit I've noticed that JSObject copied >> JavaScriptObject functionality except that it created arrays as "new >> Array()". I tried it and have failed because didn't noticed "$wnd" >> absence. That is how I come up with my conclusion. >> >> Hope that will help others. >> >> On Wed, Feb 2, 2011 at 8:57 PM, Edwin Commandeur >> <com...@gm...> wrote: >>> Hi Alexander, >>> >>> Great that you like GWT-OL. I would be very interested in your >>> additions to the project. Sending them in an Archive is fine, I can >>> run Beyond Compare to see what's changed. >>> >>> You can also try a Hg export if you have made the changes against a >>> recent clone of Hg repo. >>> >>> Greetings, >>> Edwin >>> >>> On 2 February 2011 08:30, Alexander Solovets <aso...@gm...> wrote: >>>> Hello! >>>> >>>> My name is Alexander. First of all let me thank you for such a >>>> binding! I can find almost all I want from original OpenLayers. But in >>>> fact some classes are missing and others does not implement some >>>> required methods, so I have to add them by myself. Since I've already >>>> accumulated several implementations I would like to share them with >>>> others. If it is possible I could send an archive with source code. >>>> >>>> Thanks >>>> >>>> -- >>>> Regards, Alexander. >>>> >>>> ------------------------------------------------------------------------------ >>>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >>>> Finally, a world-class log management solution at an even better price-free! >>>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >>>> February 28th, so secure your free ArcSight Logger TODAY! >>>> http://p.sf.net/sfu/arcsight-sfd2d >>>> _______________________________________________ >>>> Gwt-openlayers-users mailing list >>>> Gwt...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >>>> >>> >> > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |