Bug in GuiTextEditCtrl - "variable" not being read
by Tony Peguero · in Torque Game Engine · 12/27/2005 (2:59 pm) · 4 replies
Hi all.
There appears to be a bug in GuiTextEditCtrl that has been introduced somewhere between TGE 1.3 and 1.4.
The "variable" parameter is not getting read correctly. A good example of this is the Player Name field of the starter.fps startMission dialog, which should display the name retrieved from $pref::Player::Name. This worked correctly in 1.3, but now it seems that the control is just set to an empty string, overwriting the value stored in the variable.
I've confirmed that the problem is with the edit control by putting "echo("Player Name:" SPC $pref::Player::Name);" in various places throughout my scripts, which show the correct name right up until the startMission.gui file is exec'd, but after which it shows blank. I also added a GuiTextCtrl to the mainMenu gui file, set to use the same variable, and surrounded that with the same echo statement. The correct name was echoed before and after the mainMenu file was exec'd, but when I changed that control to a GuiTextEditCtrl, the name was blanked again.
Note that the edit control is assigning to the variable correctly when text is entered into it.
There appears to be a bug in GuiTextEditCtrl that has been introduced somewhere between TGE 1.3 and 1.4.
The "variable" parameter is not getting read correctly. A good example of this is the Player Name field of the starter.fps startMission dialog, which should display the name retrieved from $pref::Player::Name. This worked correctly in 1.3, but now it seems that the control is just set to an empty string, overwriting the value stored in the variable.
I've confirmed that the problem is with the edit control by putting "echo("Player Name:" SPC $pref::Player::Name);" in various places throughout my scripts, which show the correct name right up until the startMission.gui file is exec'd, but after which it shows blank. I also added a GuiTextCtrl to the mainMenu gui file, set to use the same variable, and surrounded that with the same echo statement. The correct name was echoed before and after the mainMenu file was exec'd, but when I changed that control to a GuiTextEditCtrl, the name was blanked again.
Note that the edit control is assigning to the variable correctly when text is entered into it.
Torque Owner Tony Peguero