[OpenLayers-Users] Calling parent method

Andreas Hocevar ahocevar at opengeo.org
Tue Mar 15 22:31:04 EDT 2011


Hi,

this is a matter of plain JavaScript. If you're extending the foo method of class A, you would call

A.prototype.foo.apply(this, arguments);

Regards,
Andreas.

On Mar 15, 2011, at 17:55 , Jeff Dege wrote:

> If I’m extending an OpenLayers class and want to override a method in the base class, and then call the method in the base class from the method in the derived class, what syntax do I use?
>  
> Every javascript library seems to use its own methods for constructing classes and handling inheritance, and I haven’t been able to figure out how to do this in the class constructs that OpenLayers uses.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list