Page 1 of 1

EditBox crashing

Posted: Sat Nov 25, 2006 17:17
by arbuckle911
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.

Posted: Mon Nov 27, 2006 15:25
by Rackle
Check the pointers returned by getChild(). Most likely the names are not exactly identical but instead are only nearly identical.