Subj : Calling base class static method using derived class To : netscape.public.mozilla.jseng From : rush@manbert.com Date : Thu Aug 25 2005 01:00 pm Hello, In C++, I can do this (ignoring constructors, etc.): class Base { public: static int baseMethod (void); }; class Derived : public Base { }; Base::baseMethod (); Derived::baseMethod (); i.e. I can use the derived class type to call the base class static method. Should I be able to do this in javascript/SpiderMonkey? I did the equivalent to this, then wrote this JS code: var b = new Base (); b.baseMethod(); Base.baseMethod(); var d = new Derived (); d.baseMethod(); Derived.baseMethod(); The JS engine threw an exception at the last line (Derived.baseMethod()). I'm trying to figure out whether this is correct behavior or not. If I should be able to make this call (assuming it should work like C++), then what is required to make it possible? (Of course, maybe this is a gcc extension to standard C++. Maybe I should try it on a Windows machine...sigh...) Thanks, Rush .