Subscribe Bookmark RSS Feed

collistbox() << Get Min Items

vince_faller

Super User

Joined:

Mar 17, 2015

Trying to get an unknown collistbox's number of required items.  Something like this.

 

dt = open("$Sample_Data\Big Class.jmp");
nw = new window("Test", 
	Hlistbox(collistbox(all),
		Vlistbox(
			clb_1 = collistbox({}, minitems(2)), 
			clb_2 = collistbox({}, minitems(1)), 
		)
	), 
	buttonbox("OK", 
		check1 = clb_1 << Get min items;
		check2 = clb_2 << Get Min items;
		if(	nitems(clb_1 << Get items) < check1 |
			nitems(clb_2 << Get items) < check2, 
			print("Bad News Bears"), 
			print("Good News Everyone")
		);
		nw << Close window();
	)
);

 

This doesn't work and there doesn't seem to be anything in the scripting index.  And for all intensive purposes I can't make the min a variable and check against it.  

2 REPLIES
Justin_Chilton

Joined:

Aug 27, 2015

My guess is that you are using an older version of JMP. Your script works fine in my JMP 13. The Get Min Items message was added in JMP 11.

 

Justin
vince_faller

Super User

Joined:

Mar 17, 2015

Drats.  Yep for this one I'm in JMP 10.0.0.  Gross.