Jun 10, 2011
Post id: 308149 Report Item

I'm a noob at Ui's. I can't figure out how to query certain things. For instance the below script is directly from the Maya help for "textFields".... I can't figure out how print the address, or perhaps the name field. I've been searching online for explanations but none seem to work for me. I'm sure its simple. I've been successful in querying numbers, but when ever i have a field with text in it I get lost.

If someone could query the address field in this example properly for me, I'm sure i could figure it out from there. Thanks in advance!


// Create a window with a some fields for entering text.


string $window = `window`;

rowColumnLayout -numberOfColumns 2 -columnAttach 1 "right" 0

-columnWidth 1 100 -columnWidth 2 250;

text -label "Name";

string $name = `textField`;

text -label "Address";

string $address = `textField`;

text -label "Phone Number";

string $phoneNumber = `textField`;

text -label "Email";

string $email = `textField`;


// Attach commands to pass focus to the next field if the Enter

// key is pressed. Hitting just the Return key will keep focus

// in the current field.


textField -edit -enterCommand ("setFocus " + $address) $name;

textField -edit -enterCommand ("setFocus " + $phoneNumber) $address;

textField -edit -enterCommand ("setFocus " + $email) $phoneNumber;

textField -edit -enterCommand ("setFocus " + $name) $email;


showWindow $window;



Jun 10, 2011
Post id: 308150 Report Item

textField -query -text $address;

Jun 13, 2011
Post id: 308173 Report Item

Thanks so much!