Game Development Community

Strange GuiTextEditCtrl Behaviour (TGEA 1.7.1)...

by Quinton Delpeche · in Torque Game Engine Advanced · 03/18/2009 (7:10 am) · 4 replies

I am experiencing some strange behaviour with my GuiTextEditCtrl that I am using in TGEA 1.7.1 (running AFX 1.1.2) and I have searched the forums and blogs and can't seem to find a solution for my problem. Hopefully someone here can help me.

I have a login screen that has a GuiTextEditCtrl for both the Username and Password fields. The password field has a password mask of * and both have a history of 1.

When I fill in the fields and hit the login button, all the actions work correctly and the fields return the correct results, but when I use the setValue("") option on the fields ... the value is actually never reset. The field always seems to keep its last entered value.

However if I use setValue(" ") ... then the problem seems to go away. I do not however want to use setValue(" ") as this may cause some further problems down the line.

Is there a way to reset a GuiTextEditCtrl to a null value ... so to speak?

About the author

Gobbo Games is an Independent Games Development company operating from Durban in South Africa. We believe in creating high-quality cost-effective games that remain true to the belief of Independent Game Developers around the world.


#1
03/18/2009 (8:31 am)
Have you tried %ctrl.setText(""); ?
#2
03/18/2009 (9:06 am)
Yep ... same problem. :(
#3
03/18/2009 (9:55 am)
Hmm, strange... What about setting its associated variable like $eVar = ""; ? Though I'm pretty sure you've tried that by now... :/
#4
03/19/2009 (2:03 am)
Ted ... the variables did the trick. I completely forgot about using those little gems. :) I can be such a noob sometimes. Thanks.