MouseListener Override


#1

sorta a CS question … not sure if something is possible …

When overriding a function of a base class, is there some way to pass a message down to execute the function in the superclass?

I want to be able to add …

class whatever : public Slider
{

MouseDown()
{
… do some things if CTRL is held …
… somehow pass it on to Slider::MouseDown() superclass if not …
}

}


#2

You very nearly answered your own question there - it’d be

MouseDown() { if (...) .. do some things .... else Slider::MouseDown(); }


#3

Power of Inheritance and friend class…


#4

Wow!!! And I doubted it would be so simple.

I love it when the psuedo-coding turns out to be a few steps ahead of the psuedo-coder … :