>     addFeatures: function(features) {
>              /// your code
>              OpenLayers.Layer.GML.prototype.addFeatures.apply(this, 
> [arguments]);
>              /// your code
>         },

-e



On 7/5/07, Jeff Dege <[EMAIL PROTECTED]> wrote:
> In a derived class, how do I override a method, and then call the
> parent's implementation of that method?
>
> In C++:
>
>    class Foo()
>    {
>       virtual void snaffle() { cout << "Snaffle!" << endl; }
>    }
>
>    class Bar: public Foo
>    {
>       virtual void snaffle() { Foo::snaffle(); Foo::snaffle(); }
>    }
>
> In OpenLayers Javascript?
>
>
> OpenLayers.Layer.MyGML = OpenLayers.Class.create();
> OpenLayers.Layer.MyGML.prototype =
>   OpenLayers.Class.inherit( OpenLayers.Layer.GML, {
>      initialize: function(name, url, options) {
>         var newArguments = new Array()
>         newArguments.push(name, options);
>         OpenLayers.Layer.GML.prototype.initialize.apply(this,
> newArguments);
>         this.url = url;
>     },
>     addFeatures: function(features) {
>                 How???
>         },
>     /** @final @type String */
>     CLASS_NAME: "OpenLayers.Layer.MyGML"
>     });
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to