Game Development Community

MLTextEditCtrl not working well

by gamer · in Torque Game Engine · 08/16/2006 (4:51 pm) · 8 replies

MLTextEditCtrl.getText() does not return the full text that I typed into the box. For example if I type in 12345678, only 1234 is returned by getText(), and rest of the characters get chopped off. is there a bug in the engine?
thanks

#1
08/16/2006 (5:33 pm)
Try getvalue()
#2
08/16/2006 (6:23 pm)
GetValue() returns the same thing as getText(), the text still got cut off.
#3
08/16/2006 (9:07 pm)
Try putting this fix in:
Fix for guiTextEditCtrl.cc

There is indeed a problem in 1.4.
#4
08/17/2006 (11:14 am)
This seems to be related to the password freeze problem, not related to my problem?
thanks
#5
08/17/2006 (11:24 am)
It relates to more than that.

The password freeze problem is the most severe, thus it's highlighted, however there are other fixes as well which WILL fix your problem.

Just copy / paste the contents of that resource into your guiTextEditCtrl.cc file and recompile.
#6
08/17/2006 (11:50 am)
Thanks that did it! great fix. however one minor problem remains: when I press backspace, it doesn't delete the character, just moves the cursor backwards, the character still remains. any idea?
#7
08/17/2006 (11:54 am)
Try changing:
void GuiTextEditCtrl::setScriptValue(const char *value)
{
   mTextBuffer.set(value);
   [b]mCursorPos = mTextBuffer.length() - 1;[/b]
}

To:
void GuiTextEditCtrl::setScriptValue(const char *value)
{
   mTextBuffer.set(value);
   [b]mCursorPos = mTextBuffer.length();[/b]
}
#8
08/17/2006 (6:11 pm)
Tim,
thanks but that didn't help ;[