cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Jackie_
Level VII

Creating a UI to input a file using button box and generating graph in the same window

Hi,

 

I'm trying to create a UI to input a JMP file using button box and generating graph in the same window in Vlistbox. 

Here's me code: It gives me an error because the data table isn't selected. Any suggestions?

 

Names Default To Here( 1 );

New Window( "",
	modal, 

	Button Box( " Click to Open", dt = Open( "$SAMPLE_DATA/Big Class.jmp" ) ),
	V List Box(
		obj = dt << Graph Builder(
			Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
			Elements( Box Plot( X, Y ) )
		)
	)
);
1 ACCEPTED SOLUTION

Accepted Solutions
ErraticAttack
Level VI

Re: Creating a UI to input a file using button box and generating graph in the same window

You need to defer filling in the VLB until the button is pressed.  Also, you can use the Platform() function to help with table scoping (speaking of scoping, you can use the window pseudo-namespace to help with scoping)

 

New Window( "Test",
	Modal
,
	Button Box( " Click to Open",
		window:dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
		window:vlb << Append(
			Platform( window:dt,
				window:obj = window:dt << Graph Builder(
					Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
					Elements( Box Plot( X, Y ) )
				)
			)
		)
	)
,
	window:vlb = V List Box()
);
Jordan

View solution in original post

1 REPLY 1
ErraticAttack
Level VI

Re: Creating a UI to input a file using button box and generating graph in the same window

You need to defer filling in the VLB until the button is pressed.  Also, you can use the Platform() function to help with table scoping (speaking of scoping, you can use the window pseudo-namespace to help with scoping)

 

New Window( "Test",
	Modal
,
	Button Box( " Click to Open",
		window:dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
		window:vlb << Append(
			Platform( window:dt,
				window:obj = window:dt << Graph Builder(
					Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
					Elements( Box Plot( X, Y ) )
				)
			)
		)
	)
,
	window:vlb = V List Box()
);
Jordan

Recommended Articles