TextEditCtrl and local variables
by Todd Wilkinson · in Technical Issues · 08/09/2007 (2:07 pm) · 1 replies
Hi all :).
I'm working on a game right now with just the scripting side of TGE 1.5.
So far I'm able to do just about everything I need, (though I'm sure there will be a time when I need to buy the engine).
My question today is, how can I get what the player has input into a textEditCtrl without saving it as a global variable on their end. This is key as one of the fields is a player password.
function PlayerSelectDlg::loadPlayer(%this)
{
echo("---In loadPlayer---");
echo(nameEntry.text);
echo(passwordEntry.text);
%playerName = nameEntry.text;
%playerPass = passwordEntry.text;
commandToServer('loadPlayer', %playerName, %playerPass);
}
This is currently what is called when the player inputs their information and hits a "Load Player" button. nameEntry.text and passwordEntry.text both return null values. I've noticed the possible use of a variable field in the datablock of the edit box, but from what I can tell, that saves a global variable which would be a security risk if more than one person uses the computer.
Any assistance would be greatly appreciated :-D.
I'm working on a game right now with just the scripting side of TGE 1.5.
So far I'm able to do just about everything I need, (though I'm sure there will be a time when I need to buy the engine).
My question today is, how can I get what the player has input into a textEditCtrl without saving it as a global variable on their end. This is key as one of the fields is a player password.
function PlayerSelectDlg::loadPlayer(%this)
{
echo("---In loadPlayer---");
echo(nameEntry.text);
echo(passwordEntry.text);
%playerName = nameEntry.text;
%playerPass = passwordEntry.text;
commandToServer('loadPlayer', %playerName, %playerPass);
}
This is currently what is called when the player inputs their information and hits a "Load Player" button. nameEntry.text and passwordEntry.text both return null values. I've noticed the possible use of a variable field in the datablock of the edit box, but from what I can tell, that saves a global variable which would be a security risk if more than one person uses the computer.
Any assistance would be greatly appreciated :-D.
Todd Wilkinson
nameEntry.getValue() :)