BluOokami
11-03-2010 01:49:15
Hi,
I'm getting stuck on a segmentation fault when I try to find widgets from delegated functions.
Take for example I successfully load a layout and then successfully delegate functions in the following class
example code:
I'm getting stuck on a segmentation fault when I try to find widgets from delegated functions.
Take for example I successfully load a layout and then successfully delegate functions in the following class
example code:
#include "Ogre.h"
#include "MyGUI.h"
#include "MenuHandler.h"
MenuHandler::MenuHandler(MyGUI::Gui *cGUI)
{
//mGUI is member variable
mGUI = cGUI;
//adding this runs just fine
MyGUI::ButtonPtr myButton = mGUI->findWidget<MyGUI::Button>("btnNote");
}
//function delegated
void MenuHandler::logWrite_Click(MyGUI::WidgetPtr _widget)
{
//adding this results in a segmentation fault
MyGUI::EditPtr myEdit = mGUI->findWidget<MyGUI::Edit>("edtNote");
}