I´m relatively new to C++ and JUCE development. So don´t hammer on me :-)
I´m trying to get it right and as I thought it would be relatively simple to add a TextButton as a Pointer. Doing it as in the Tutorial works as expected, although in a previous project I managed to use ScopedPointers for Buttons/Sliders, etc.
having a ScopedPointer (or unique_ptr) always throws me an exception (using PluginHost) that when ->setBounds(x,y,w,h) is called, because the Object not yet exists.
In the Header I got:
private: ScopedPointer<TextButton> bt_scope;
// Button Scope addAndMakeVisible(bt_scope = new TextButton("Scope Test")); bt_scope->addListener(this);
And then in the resized() Funktion:
bt_scope->setBounds(10, 40, 30, 30);
It worked befor using JUCE 3.0.8. What am I missing here?
moving the setBounds from resized() to the Constructor works. But that is not how it is supposed to work right?
Sorry for that basic question. New guy working into PluginCoding :-)