Newb question about Button

I’ve a very simple question about the buttons. I’ve a component containing several button. I believe that I have to make my component inherit from button listener and override the buttonClicked() method but I’ve just try to do:

buttonClicked(Button *button)
  std::cout << "coucou" << std::endl;

And it does not work. :frowning:
Even if it is really what I’ve to do, I don’t know how to apply different method for this or that component. :frowning:

I hope to be understandable.

probably you haven’t called button->addListener (this); for all your buttons in your component constructor.

the best approach is to do that with the jucer, and see the resulting code !

ok thx for the answer and for the idea
I’ll try now :stuck_out_tongue: :stuck_out_tongue:

Fine the “coucou” works but I can’t try the Jucer to find what to do with several button. I work in my University and the computers work with Linux but I’ll try at home on my computer. I hope that I’ll find the solution.
If not, I’ll disturb you again with my stupid questions :smiley:

the jucer is built with juce, so i don’t see any problem running it on linux :smiley:

Yes you’re right but I just find precompiled version of jucer.
Can you tell me where I can find the source

:idea: :idea:
I’ve take a little longer look in the site and seen that the srce is in juce. :roll: :roll:

Compile it yourself. *nix machines like to set custom global params to help the machine run better, that is why you always want to compile locally, even if you have a binary version.