@jthi Thanks for the reply! So the reason I didn't just do a simple equality is because everytime I tried to access the single member column name list, I always get something along the lines of this error (its similar with other commands):
Send Expects Scriptable Object at row 1 in access or evaluation of 'Send' , clb << /*###*/Get( 1 ) /*###*/
I tried accessing it the way you suggested, with a get items command, but that error kept popping up. The code below shows where the variables show up first (its the majorVar and minorVar). I've never used the window:xxx syntax before, so maybe there is some way this handles variables that I don't understand?
New Window("Select Variables", << Type("Modal Dialog"),
<<On Validate(
window:validated
)
,
window:enable function = Function( {},
{Default Local},
majorVar = window:lbMajor << Get Selected;
minorVar = window:lbMinor << Get Selected;
If( N Items( majorVar ) & N Items( minorVar ) & majorVar != minorVar,
window:validated = 1
,
window:validated = 0
);
window:ok button << Enable( window:validated )
);
H List Box(
V List Box(
Text Box("Select Major Variable"),
window:lbMajor = List Box(combinedCols, <<Set Max Selected(1), enable function )
),
V List Box(
Text Box("Select Minor Variable"),
window:lbMinor = List Box(combinedCols, <<Set Max Selected(1), enable function)
)
),
H List Box(
window:ok button = Button Box("OK",
majorVar = window:lbMajor << Get Selected;
minorVar = window:lbMinor << Get Selected;
If( N Items( majorVar ) & N Items( minorVar ) & majorVar != minorVar,
window:validated = 1
,
window:validated = 0
);
If( window:validated,
Print("Processing with major: " || Char(majorVar) || ", minor: " || Char(minorVar));
Window("Select Variables") << Close Window;
,
Beep(); // Optional: Add a beep sound for alert
Show("Invalid Selection");
{window:lbMajor, window:lbMinor} << Select; window:lbMajor << Inval << Update Window;
Wait( 0.25 );
{window:lbMajor, window:lbMinor} << DeSelect; window:lbMajor << Inval << Update Window;
Wait( 0.25 );
{window:lbMajor, window:lbMinor} << Select; window:lbMajor << Inval << Update Window;
Wait( 0.25 );
{window:lbMajor, window:lbMinor} << DeSelect; window:lbMajor << Inval << Update Window;
)
,
<<Enable( 0 )
)
,
Button Box("Cancel", Throw("!Canceled Graph Building") )
)
);
Edward Hamer Chandler, Jr.