GUI parameters
by Ted Lilljegren · in Technical Issues · 06/21/2008 (1:42 pm) · 1 replies
Just out of pure paranoia:
Currently, i can move around GUI objects and change their text values(if any) from script by just calling the objects name and the parameter EG niceButton.text = "Ama nice button click me";
But i noticed that there are also a console function that does exactly the same thing:
niceButton.setText("Ama nice button click me");
Whats up with that? Is it because I run torque in standalone mode that it allows me to change GUI parameters by simply asigning them a new value instead of calling console functions, or is it suposed to work this way?
Currently, i can move around GUI objects and change their text values(if any) from script by just calling the objects name and the parameter EG niceButton.text = "Ama nice button click me";
But i noticed that there are also a console function that does exactly the same thing:
niceButton.setText("Ama nice button click me");
Whats up with that? Is it because I run torque in standalone mode that it allows me to change GUI parameters by simply asigning them a new value instead of calling console functions, or is it suposed to work this way?
About the author
Associate Rene Damm
I think the easiest solution is to play safe and use fields primarily for reading out values while using methods (where available) to modify a control's state. Of course, looking at the engine source code will always provide a definite answer on what's doing what.