Hi all!
i (want to) create a extra desktop window like this:
[code]void Module::mouseDoubleClick ( const MouseEvent & e ) {
if (!moduleGUI) {
moduleGUI = new ModuleGUI(this->getName(),Colours::lightgrey,
DocumentWindow::allButtons,
true);
moduleGUI->setBounds(0,0,200,200);
moduleGUI->setVisible(true);
//getTopLevelComponent()->addAndMakeVisible(moduleGUI);
} else {
//moduleGUI->removeFromDesktop();
deleteAndZero(moduleGUI);
//moduleGUI = 0;
}
}[/code]
and this double click toggleing works nice.
but if i exit the whole app via “JUCE::quit()” and the window is open, i get a juce error while debugging telling me some window has not beeing deleted:
// doh! If you don't delete all your windows before exiting, you're going to
// be leaking memory!
i added this to try to solve it
(since the window is not added to a parent , it seems necessary to get rid of it manually [children get deleted aututomaticle do they?] ):
Module::~Module() {
if(moduleGUI )deleteAndZero( moduleGUI );
}
i also tried to use “removeFromDesktop();” in some places and combinations of both wich brings me to another warning/erro
but his gives me a hint to make this command thread save and use the “MessageManagerLock”, wich i use like this:
const MessageManagerLock mmLock;
wich then brings me back to the other error.
where to delete it?
pleas help me.
thanks.
D3CK
btw.: I really like the sytle of juce! you had java in mind? thanks for giving it to us.