Slider addChangelistener not working!?


#1

Following the Beginners tutorial it says

However I get the following error

This is straight out of the tutorial! when it says a slider is the most obvious ChangeBroadcaster, what could be happening?


#2

That tutorial’s very old now, and many things have changed since haydxn wrote it…

If you look up the Slider class help, it tells you about SliderListeners, which is how it works now.


#3

Thank jules, so do I still need to have the ChangeListener

class MainComponent :public Component, public ButtonListener, public ChangeListener

also if I do the following in my component constructor:

Where is the callback function for this?

It would be tremendous help if there were clear documentation on what has changed and so on, code examples would go a long way. Thanx


#4

Looks like you’re a bit of a c++ noob - you need to make your class a SliderListener, and forget about ChangeListeners. Or just use the Jucer to generate code with slider callbacks.

Is the SliderListener documentation not clear? It’s a very simple class, and there are many examples of them in the demo code.


#5

So, what are the situations where u would use changelistener? Where is the documentation that gives me an overview of your intended framework, I don’t mean the doxygen generated docs. Do you have any other tutorials that are more up to date with all the changes? what listener or broadcaster are you suppose to use with what?


#6

No, I don’t have any other tutorials, and am too busy writing code to write more general overviews of the library…

But if you read the doxygen info for ChangeListener and ChangeListenerList, it’s all explained in detail. What else could I add to it? And if you search the demo code for “ChangeListener” or “changeListenerCallback”, there must be plenty of examples of it in use.


#7