I add new button in DocumentWindow. Jucer add the button with addAndMakeVisible metod? and when my programm is running I receive:
âjuce_application.exe has triggered a breakpointâ and stop in
void ResizableWindow::addAndMakeVisible (Component* const child, int zOrder)
{
/* Agh! You shouldn't add components directly to a ResizableWindow - this class
manages its child components automatically, and if you add your own it'll cause
trouble. Instead, use setContentComponent() to give it a component which
will be automatically resized and kept in the right place - then you can add
subcomponents to the content comp. See the notes for the ResizableWindow class
for more info.
If you really know what you're doing and want to avoid this assertion, just call
Component::addAndMakeVisible directly.
*/
jassertfalse //my programm is stopped
Component::addAndMakeVisible (child, zOrder);
}
And I have to replaced addAndMakeVisible to Component::addAndMakeVisibleâŚ
When I use setContentComponent I have problem âUnhandled exception at 0x0051dd26 in juce_application.exe: 0xC0000005: Access violation reading location 0x0000001c.â in file â\src\juce_appframework\gui\graphics\geometry\juce_rectangle.hâ
/** Returns the width of the rectangle. */
inline int getWidth() const throw() { return w; }