BookmarkSubscribe
Choose Language Hide Translation Bar
vince_faller
Super User

collistbox() << Get Min Items

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.  

Vince Faller - Predictum
0 Kudos
2 REPLIES 2

Re: collistbox() << Get Min Items

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

Re: collistbox() << Get Min Items

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

 

Vince Faller - Predictum