EditBox crashing
Posted: Sat Nov 25, 2006 17:17
I'm having strange problems getting text from an edit box. Here is the code.
-------------------------
using namespace CEGUI;
CEGUI::MultiLineEditbox *commandlog = (CEGUI::MultiLineEditbox*)GUI->getRoot()->getChild("ChatLog");
CEGUI::Editbox *commandline = (CEGUI::Editbox*)GUI->getRoot()->getChild("CommandLine");
String temp = commandlog->getText();
if(temp.length()<=0)
-------------------------
The program is crashing on the getText line and there are no errors in the CEUIog file, so I'm sure I've got the right names and structure in. It's extermly odd because I've gotten the EXACT same code with the EXACT same layout working in another program.
-------------------------
using namespace CEGUI;
CEGUI::MultiLineEditbox *commandlog = (CEGUI::MultiLineEditbox*)GUI->getRoot()->getChild("ChatLog");
CEGUI::Editbox *commandline = (CEGUI::Editbox*)GUI->getRoot()->getChild("CommandLine");
String temp = commandlog->getText();
if(temp.length()<=0)
-------------------------
The program is crashing on the getText line and there are no errors in the CEUIog file, so I'm sure I've got the right names and structure in. It's extermly odd because I've gotten the EXACT same code with the EXACT same layout working in another program.