What I need to do is extremely simple, but after hours of web searching, I can't find a way to do it.
I have a textField where you type in a file path. When you hit enter (or preferrably -changeCommand), I want a global variable to be handed the contents of that textField. Could someone please post a simple example of making a text field that passes its contents to a global variable?
I looked here, but even his script doesn't do what it's supposed to:
Here's an excerpt of what I've got, that's totally not working..
//initialize controller name input
string $p2e_ctrlText = `text -label "controller name:"`;
string $p2e_ctrlMainName = `textField -editable true`;
textField -edit -enterCommand ("changeVariable("+$p2e_ctrlMainName+")") $p2e_ctrlMainName;
At least this doesn't complain about undeclared variables, but no matter what, it never calls the changeVariable proc. I can hit enter all day long on that text field, but nothing ever happens...
Any help would be greatly appreciated, because I have to go back to work tomorrow with something that works!!