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

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