cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles