Game Development Community

No GetText in GuiTextCtrl.h?

by Vince Gee · in Torque Game Engine · 07/01/2005 (8:31 pm) · 2 replies

I've got a stupid question...

Why is there not in guiTextCtrl.h this console method?

ConsoleMethod( GuiTextCtrl, getText, const char*, 2, 2, "obj.getText()" )
{
char *ret = Con::getReturnBuffer(10000);
dStrcpy(ret,"1");
argc;
dStrcpy(ret,object->getText());
return (ret);
}

To me, if you expose the SetText, why didn't you expose a GetText? It doesn't seem logical to me...

Vince

#1
07/02/2005 (12:46 am)
It's in GuiMLTextCtrl.cc I don't know a lot about the GUI system though, so no clue how close that is to what you need.
ConsoleMethod( GuiMLTextCtrl, getText, const char*, 2, 2, "Returns the text from the control, including ML.")
{
   return( object->getTextContent() );
}
#2
07/02/2005 (2:28 am)
The function is there... it just isn't called getText. It is called getValue();