EditBox crashing

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

arbuckle911
Just popping in
Just popping in
Posts: 6
Joined: Sat Nov 25, 2006 01:50

EditBox crashing

Postby arbuckle911 » 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.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Mon Nov 27, 2006 15:25

Check the pointers returned by getChild(). Most likely the names are not exactly identical but instead are only nearly identical.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests