Oh Button, why have thee no default constructor?

Is it so I get RSI? :slight_smile:

Auditioning for the RSC Jim? :rofl:

1 Like
1 Like

I’m going to have to watch that tonight now!

However… also … can Button please get a default constructor :slight_smile:

Isn’t it because Button is an abstract class?
I mean, having a default constructor is not strictly related with the abstract-ness of a class, but maybe the problem is resolved by the fact that all the concrete classes for it have a default constructor?

Yeah, it’s abstract … we reimplement button for each new type of button we decide to create. It’s just a bit annoying having to give it a name we don’t use each time! I must type : Button({} () a zillion times! A button is about 4 lines of code normally, icons, text and everything so the juce:: concrete implementations just make it more complicated…

How about making a new base class, derived from Button, which has a default ctor?


How about Button() = default; appearing in some future version of JUCE …