PDA

View Full Version : Menu Item -command


Pyrokinesis
01-03-2007, 01:14 AM
I was going to post a question about how to use a single procedure for multiple TSL's RMB functionality. I was having a problem with the syntax when calling the proc with its argument.

So I just wanted to share incase anyone else had the same drama.

// Procedure
global proc RMBAttributeEditor (string $TSL) {
string $selected[] = `textScrollList -query -selectItem $TSL`;
select $selected;
showEditor $selected[0];
}

// call to the proc inside menuItem
menuItem
-label "Attribute Editor"
-command ("RMBAttributeEditor(" + "\"TSLGarSeams\"" + ")");

This syntax for showing "" doesnt make sense at first glance, but it works perfectly.

CGTalk Moderation
01-03-2007, 01:14 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.