cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
kachveder
Level III

Name Unresolved: Button in access or evaluation JMP Alert Message

Hello, 

 

I was wondering if you could help me with this JMP Alert message I get when I run the following jsl: 

 

//select the data in the original data table 
Names Default To Here( 1 );
dt = Current Data Table();

//column names 


//part 1. ask user for column names in a new window nw1
//possible Group column name (should be character) 
groupby_col_names = dt << Get Column names(character, String);
//possible result column name (should be numeric)
numeric_col_names = dt << Get Column names(Numeric, String);
nw1 = New Window("Generate an EAC Table",
	<<Modal,
	Text Box ("Select the variable with the the historical group in it:"),
	groupby_col = Radio Box(groupby_col_names),
	Text Box ("Select the variable with the results:"), 
	result_col = Radio Box(numeric_col_names),
	H List Box(
		Button Box("OK", 
		answers = Eval List(
		{
			set_groupby = groupby_col << get selected, 
			set_resultcol = result_col << get selected
		}
		);
	nw1 << close window;
		),
	Button Box("Cancel")
		), 
	//change popup window size
	<<Size Window(500,400)
);	

// If cancel or red X was clicked, stop the script
If( nw1 == {Button( -1 )}, Stop() );

 

kachveder_0-1699461751653.png

 

When I press "OK" it runs the code, and when I "X" or "Cancel", the code is not run. So, the program is as intended.

 

But how can I get this JMP Alert to go away? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Name Unresolved: Button in access or evaluation JMP Alert Message

Remove

 

			nw1 << close window;

from the "OK" button (window will be closed automatically as it is modal window).

 

Usually when I do comparison with modal windows, I tend to use << return result and then check for window_ref["Button"] != 1

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Name Unresolved: Button in access or evaluation JMP Alert Message

Remove

 

			nw1 << close window;

from the "OK" button (window will be closed automatically as it is modal window).

 

Usually when I do comparison with modal windows, I tend to use << return result and then check for window_ref["Button"] != 1

 

-Jarmo