StinkyMarker
31-07-2007 13:50:37
id like to catch the button click of the X in the title bar, and i do so like this:
closeButton->addEventHandler<GuiMessageBox>(QuickGUI::Widget::QGUI_EVENT_MOUSE_CLICK,&GuiMessageBox::closeEvent,this);
the event handler is called, at which point i'd like to actually remove all widgets associated with the window....and i do it like so:
bool closeEvent(const QuickGUI::EventArgs &args)
{
mWindow->removeAndDestroyAllChildWidgets();
return true;
};
however, on the next update of my input handling, where i do:
mGuiManager->injectMouseMove( e.state.X.rel, e.state.Y.rel );
i get a crash that says:
unhandled exception... exception: std::bad_alloc at memory location 0x0012dfd8.. which happens somewhere in QUickGUI, but i cant see it...stems from the injection call though. I probably did something wrong, so any help would be appreciated.
closeButton->addEventHandler<GuiMessageBox>(QuickGUI::Widget::QGUI_EVENT_MOUSE_CLICK,&GuiMessageBox::closeEvent,this);
the event handler is called, at which point i'd like to actually remove all widgets associated with the window....and i do it like so:
bool closeEvent(const QuickGUI::EventArgs &args)
{
mWindow->removeAndDestroyAllChildWidgets();
return true;
};
however, on the next update of my input handling, where i do:
mGuiManager->injectMouseMove( e.state.X.rel, e.state.Y.rel );
i get a crash that says:
unhandled exception... exception: std::bad_alloc at memory location 0x0012dfd8.. which happens somewhere in QUickGUI, but i cant see it...stems from the injection call though. I probably did something wrong, so any help would be appreciated.