[OpenLayers-Dev] Re: [OpenLayers 3] type instantiation performance
Andreas Hocevar
ahocevar at opengeo.org
Fri Oct 22 04:36:57 EDT 2010
Alright. Sorry, I had missed your initial posting that contained all this.
/me should not raise voice without reading the whole thread thoroughly.
The part that I had missed was that your proposal was to get rid of OpenLayers.Class entirely. I agree that this change makes more sense than working around an expensive instantiation through OpenLayers.Class.
Thanks,
Andreas.
On Oct 22, 2010, at 10:12 , Eric Lemoine wrote:
> On Friday, October 22, 2010, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>> It will be good to see this "pure JS" approach in action, with actual code. Especially how subclassing and instanceof checking for any class in the inheritance chain would work.
>
> Just look at my OpenLayers.inherit function and the examples I provided.
>
> Basically;
>
> P = function() {
> };
> P.prototype = {
> };
> p = new P;
> p instanceof P;
>
> C = function() {
> P.call(this);
> };
> OpenLayers.inherit(C, P, {
> });
> c = new C;
> c instanceof C;
> c instanceof P;
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev
mailing list