Re: Call functions of superclass



On Aug 23, 2006, at 10:30 AM, Bart Braem wrote:

I'd like to be able to do
class Parent
def iamuseful
end
end
class Child

class Child < Parent

def iamuseful
# do stuff
super.iamuseful
end
end
But that gives strange results, I seem to be unable to call methods from a
superclass?

Try the correction above. ;)

James Edward Gray II

.



Relevant Pages

  • virtual slicing problem using std::vector<someclass>
    ... virtual void print() { ... class child: public parent { ...
    (comp.lang.cpp)
  • Re: Call functions of superclass
    ... But that gives strange results, I seem to be unable to call methods from a ... class Child < Parent ...
    (comp.lang.ruby)
  • Call functions of superclass
    ... But that gives strange results, I seem to be unable to call methods from a ...
    (comp.lang.ruby)
  • Re: ansi status of using
    ... > public method in the base class into a private method in the child class? ... > class child: public parent { ...
    (comp.lang.cpp)
  • Re: OOP???
    ... >> of class Parent ... but you can't override it. ... > If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)