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
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
About the author
www.winterleafentertainment.com
#2
07/02/2005 (2:28 am)
The function is there... it just isn't called getText. It is called getValue();
Associate Alex Scarborough
ConsoleMethod( GuiMLTextCtrl, getText, const char*, 2, 2, "Returns the text from the control, including ML.") { return( object->getTextContent() ); }