Zodrac
10-17-2005, 11:45 PM
I'm having a problem with the -changeCommand flag on a checkbox.
What i'm trying to accomplish is a checkbox which runs a proc but also sends along an array when it's status is changed.
But i keep getting this error message.
// Error: RayTraceCheck($lightList); //
// Error: Line 1.25: "$lightList" is an undeclared variable. //
but i know the $lightList variable is declared it's just when the -changeCommand flag tries to use the variable it doesn't work.
The code below is just outtakes of the whole script so don't worry about anything else but the -changeCommand part. Unless you know a better way to do what i'm trying to accomplish.
I would appreciate any help.
//Zodrac
global proc Ambient_RayShadow_Controls(string $lightList[])
{
//-=Creates the use raytrace shadow checkbox=-
//**************************************************************************************************
string $RayShadow_Checkbox = `checkBox -label "Use Ray Trace Shadows"
-align "left"
-changeCommand "RayTraceCheck($lightList);"
-parent Ambient_RayShadow_Form`;
//**************************************************************************************************
//-=Positions all controls=-
//**************************************************************************************************
formLayout -edit
-attachForm $RayShadow_Checkbox "top" 10
-attachForm $RayShadow_Checkbox "left" 96
Ambient_RayShadow_Form;
//**************************************************************************************************
}
global proc RayTraceCheck(string $lightList[])
{
........
}
What i'm trying to accomplish is a checkbox which runs a proc but also sends along an array when it's status is changed.
But i keep getting this error message.
// Error: RayTraceCheck($lightList); //
// Error: Line 1.25: "$lightList" is an undeclared variable. //
but i know the $lightList variable is declared it's just when the -changeCommand flag tries to use the variable it doesn't work.
The code below is just outtakes of the whole script so don't worry about anything else but the -changeCommand part. Unless you know a better way to do what i'm trying to accomplish.
I would appreciate any help.
//Zodrac
global proc Ambient_RayShadow_Controls(string $lightList[])
{
//-=Creates the use raytrace shadow checkbox=-
//**************************************************************************************************
string $RayShadow_Checkbox = `checkBox -label "Use Ray Trace Shadows"
-align "left"
-changeCommand "RayTraceCheck($lightList);"
-parent Ambient_RayShadow_Form`;
//**************************************************************************************************
//-=Positions all controls=-
//**************************************************************************************************
formLayout -edit
-attachForm $RayShadow_Checkbox "top" 10
-attachForm $RayShadow_Checkbox "left" 96
Ambient_RayShadow_Form;
//**************************************************************************************************
}
global proc RayTraceCheck(string $lightList[])
{
........
}
