Hi!
It's me again!
I've got a textfield question.
I can use something like the following to create a textfield :
Code:
objectName = gui.addTextfield("object_name",10,30,100,20);
I can then use objectName.setValue(this.name); to get set the value of that textfield.
I was just wondering if it was at all possible to do something like the following :
Code:
gui.addTextfield("object_name",10,30,100,20);
gui.controller("object_name").setValue("blah");
I've noticed that if I try and do it that way, it requires a float, and crashes if I try and give it anything. Basically what I'm asking, is it possible to create a textfield that can have it's value set / recieved, without having to create an actual variable declaration ?
Also, when I *do* call .setValue on the top example, it *does* change the value, but it doesn't appear until I type something else in that box. Just thought you might like to know.