Game Development Community

GuiMLTextEditCtrl Bug

by Scott Doerrfeld · in Torque Game Engine · 12/01/2007 (4:16 pm) · 3 replies

I'm using TGE 1.5.2 for Mac. It seems that GuiMLTextEditCtrl doesn't work right. When you click on the gui control the cursor shows up but try typing in text and you will see that nothing happens!!!

One way I noticed you can get it working is if you push/pop another gui. For example, hit the 'tilde' key to open the console window then hit it again to close it --- wah lah! The GuiMLTextEditCtrl now responds to your key strokes!!!!

This behavior has me thinking that the control is not being designated as the "first responder" when you click on it. Why this is a Mac-specific problem I have no idea. The GuiMLTextEditCtrl works fine on the Windows end. Also, the GuiTextEditCtrl (no ML) works fine on both platforms.

I'll try to keep figuring this out. Anyone please let me know if you have any suggestions.

#1
12/01/2007 (4:26 pm)
I noticed that the control you push/pop has to have a text edit field in order for the firstResponder to get set to the GuiMLTextEditCtrl!
#2
08/05/2009 (3:29 pm)
Not sure if it is the same issue in TGE as T3D but it probably is. It seems like they fixed issues/have code in guiTextEditCtrl control that works and needs to be moved to guiMLTextEditCtrl. To fix it in T3D I just moved over the setFirstResponder and onLoseFirstResponder code from gioTextEditCtrl:

Edit: I origionally posted the code but didn't want to cause any issues since it may be T3D code so the full code is here: www.garagegames.com/community/forums/viewthread/98859

But it is easy enough to look at guiTextEditCtrl and move over.
#3
08/06/2009 (10:06 am)
note in TGE 1.4, GuiMLTextEditCtrl has a bunch of other usability shortcomings (such as no undo), many of which are addressed here.