View Single Post
# 1 02-11-2003 , 08:50 AM
nspiratn's Avatar
Registered User
Join Date: Dec 2002
Location: CA
Posts: 211

passing variables to a proc

I'm trying to pass the objectname of the radioButtonGrp to the myProc procedure. But I keep getting an error that $rButton is an undeclared variable. What am I doing wrong?

global proc myProc(string $rButton)
{
string $rButton;
int $nameButton;
$nameButton = `radioButtonGrp -q -sl $rButton`;
print $nameButton;
}

global proc TestGUIscript()
{
string $rButton;
string $window = `window -wh 400 500 -title "Radio Test"`;
rowLayout -nc 3;
text " ";
$rButton = `radioButtonGrp -numberOfRadioButtons 2 -label1 "Hierarchical" -label2 "Alphabetical"`;
print $rButton;
radioButtonGrp -edit -onCommand "myProc($rButton)" $rButton;
showWindow $window;
}

Thanks.


~nspiratn