MainContentComponent::addAndMakeVisible ambiguity

Hi all

I have this code in the MainComponent.h:

class MainContentComponent   : public Component,
                               public ButtonListener,
                               public Slider,
                               public Label
    void paint (Graphics&);
    void resized();
    void buttonClicked (Button* buttonThatWasClicked);
    //[UserVariables]   -- You can add your own custom variables in this section.

    ScopedPointer<TextButton> Button1;
    ScopedPointer<Label> Label1;
    ScopedPointer<Slider> Slider1;



followed by this code in the MainComponent.cpp



    Button1 = new TextButton (T("Nick The Jucer"));
    Label1 = new Label (T("Label 1"), T("Any Text"));
    Slider1 = new Slider (T("Slider 1"));
    Button1->setBounds(10, 10, 50, 20);     // Ορίζουμε την θέση και το μέγεθος του button
    Label1->setBounds(10, 10, 280, 20);     // Ορίζουμε την θέση και το μέγεθος του button
    Slider1->setBounds(20, 40, 260, 20);
    setSize (500, 400);  

I am receiving the error MainContentComponent::addAndMakeVisible is ambiguous.

Any idea of what is the ambiguity ?

Thanks in advance



You've inherited your content component from Component, Slider and Label.. That looks pretty broken to me.

BTW, that T("") macro is seriously deprecated, and I'd recommend avoiding it.

Look at that thing in the sky, Is that a slider,?

is that a label?

oh no is a Component !!

... .. 0.o .. ..



Jules, I had a major problem about identifying the inheritance of classes.
I already solved this problem, by drawing some inheritance diagrams and of cource thanks to the jucebrary site.
So, everything goes better for now...


Thanks for your malevolent style. In my country we have a special classification for your style.