There are really few code changes actually to make it work.
I post them here, in case it can help someone.
In "What about the other message types?", MainComponent should inherit of
public SliderListener
instead of
public ChangeListener
And it should implement the following method
void sliderValueChanged (Slider* slider)
{
double value = slider->getValue ();
label->setText (String (value), false);
}
instead of
void changeListenerCallback (void* changeSource)
{
if (changeSource == slider)
{
double value = slider->getValue ();
label->setText (String (value), false);
}
}
Finally, in the constructor, you should write
slider->addListener (this);
instead of
slider->addChangeListener (this);
As far as I can remember, that's the only things I had to change to make it
work, but I didn't finish the tutorial yet though.
Again, thanks for this awesome tutorial !!!
Original issue reported on code.google.com by denis.e...@gmail.com on 12 Jan 2010 at 6:13
Original issue reported on code.google.com by
denis.e...@gmail.com
on 12 Jan 2010 at 6:13