ButtonListener only works with Introjucer added buttons


#1

Hey!

I have a class which is derived from the ButtonListener class in order to add a listener to my DrawableButton. As long I have an ImageButton, added in the Introjucer), it works fine. But if I remove the ImageButton (which I actually don't need because I want to replace them with a DrawableButton) and have the same derivation and addListener call, it says that my class is abstract at the point where I allocated some objects of the type of this class.

Doesn't the ButtonListener work with a DrawableButton?
Or is the Introjucer adding something else what I'm missing?

By now, I added a dummy button with the size zero in the Introjucer to make it work, but that is definitely not a solution.

Thanks!


#2

ButtonListener works with any button.. Yes, you must be doing something wrong, but I don't know what!


#3

Is your class by any chance only interested in (and manually implementing) buttonStateChanged()?

That's the only thing I can think of off the top of my head (since buttonClicked is pure virtual, and is automatically implemented by the introjucer if you add a button).