cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-108462%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Ejsl%20close%20window%20does%20not%20close%20window%20in%20jmp14%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108462%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20recently%20updated%20to%20jmp%2014.1%20(my%20work%20will%20only%20allowed%20tested%20updates%20so%20still%20waiting%20on%2014.2).%20I%20have%20a%20script%20where%20I%20create%20a%20legend%20window%2C%20journal%20it%2C%20and%20then%20close%20it.%20This%20used%20to%20work%20fine%20in%20jmp%2013%20but%20now%20it%20does%20not%20close%20the%20window.%20Am%20I%20doing%20something%20wrong%20or%20is%20this%20a%20bug%3F%20Ignore%20the%20coloring%20portions%2C%20I%20have%20some%20things%20set%20up%20for%20consistent%20coloring.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EmyWin%20%3D%20Outline%20Box(%20%22Legend%22%2C%0A%20%20H%20List%20Box(%0A%20%20%20myPlot%20%3D%20dt0%20%26lt%3B%26lt%3B%20Color%20or%20Mark%20By%20Column(%0A%20%20%20%20Eval(%20myColor%20)%2C%0A%20%20%20%20Color%20Theme(%20%22POR%20Black%22%20)%2C%0A%20%20%20%20Marker%20Theme(%20%22standard%22%20)%2C%0A%20%20%20%20Continuous%20Scale(%200%20)%2C%0A%20%20%20%20Make%20Window%20With%20Legend(%201%20)%0A%20%20)%0A%20)%0A)%3B%0AmyWin%20%26lt%3B%26lt%3B%20Journal%3B%0AmyWin%20%26lt%3B%26lt%3B%20Close%20Window()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-108615%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20jsl%20close%20window%20does%20not%20close%20window%20in%20jmp14%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108615%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20don't%20believe%20there%20is%20a%20change%20in%20JMP14.%20The%20option%20%3CSTRONG%3EMake%20Window%20with%20Legend(1)%3C%2FSTRONG%3E%20is%20creating%20a%20window%2C%20but%20it%20is%20not%20myWin%2C%20it%20is%20an%20independent%20window%20called%20Legend.%26nbsp%3B%20Below%20is%20a%20modification%20of%20Jim's%20script%20to%20demonstrate%20this%20subtle%20issue.%26nbsp%3B%20Change%20the%20OutlineBox%20name%20to%20My%20Legend.%20The%20New%20Window%20()%20command%20s%20not%20needed%2C%20it%20is%20for%20demonstration.%20Bottom%20line%20is%20Make%20Window%20with%20Legend()%20creates%20an%20independent%20window%2C%20and%20it%20is%20unneccesary.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt0%3Dopen(%22%24SAMPLE_DATA%2Fbig%20class.jmp%22)%3B%0AmyColor%3D%22sex%22%3B%0A%0AmyWin%3D0%3B%0A%0AmyWin%20%3D%20Outline%20Box(%20%22%20My%20Legend%22%2C%0A%20%20H%20List%20Box(%0A%20%20%20myPlot%20%3D%20dt0%20%26lt%3B%26lt%3B%20Color%20or%20Mark%20By%20Column(%0A%20%20%20%20Eval(%20myColor%20)%2C%0A%20%20%20%20Color%20Theme(%20%22POR%20Black%22%20)%2C%0A%20%20%20%20Marker%20Theme(%20%22standard%22%20)%2C%0A%20%20%20%20Continuous%20Scale(%200%20)%2C%0A%20%20%20%20%2F%2FMake%20Window%20With%20Legend(%201%20)%0A%20%20)%0A%20)%0A)%3B%0AmyWin%20%26lt%3B%26lt%3B%20Journal%3B%0Await(0)%3B%0A%0A%0A%0Anew%20window(%22show%20it%22%2C%20myWin)%3B%0Await(2)%3B%0A%0AmyWin%20%26lt%3B%26lt%3B%20close%20window()%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-108466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20jsl%20close%20window%20does%20not%20close%20window%20in%20jmp14%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EThank%20you%2C%20this%20does%20indeed%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-108464%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20jsl%20close%20window%20does%20not%20close%20window%20in%20jmp14%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108464%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIt%20appears%20to%20be%20a%20change.....and%20you%20may%20want%20to%20report%20it%20as%20a%20bug.....but%20here%20is%20a%20work%20around%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt0%3Dopen(%22%24SAMPLE_DATA%2Fbig%20class.jmp%22)%3B%0AmyColor%3D%22sex%22%3B%0A%0A%0AmyWin%20%3D%20Outline%20Box(%20%22Legend%22%2C%0A%20%20H%20List%20Box(%0A%20%20%20myPlot%20%3D%20dt0%20%26lt%3B%26lt%3B%20Color%20or%20Mark%20By%20Column(%0A%20%20%20%20Eval(%20myColor%20)%2C%0A%20%20%20%20Color%20Theme(%20%22POR%20Black%22%20)%2C%0A%20%20%20%20Marker%20Theme(%20%22standard%22%20)%2C%0A%20%20%20%20Continuous%20Scale(%200%20)%2C%0A%20%20%20%20Make%20Window%20With%20Legend(%201%20)%0A%20%20)%0A%20)%0A)%3B%0AmyWin%20%26lt%3B%26lt%3B%20Journal%3B%0Awindow(%22Legend%22)%20%26lt%3B%26lt%3B%20Close%20Window()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
hlazar
Level III

jsl close window does not close window in jmp14

I recently updated to jmp 14.1 (my work will only allowed tested updates so still waiting on 14.2). I have a script where I create a legend window, journal it, and then close it. This used to work fine in jmp 13 but now it does not close the window. Am I doing something wrong or is this a bug? Ignore the coloring portions, I have some things set up for consistent coloring.

 

myWin = Outline Box( "Legend",
		H List Box(
			myPlot = dt0 << Color or Mark By Column(
				Eval( myColor ),
				Color Theme( "POR Black" ),
				Marker Theme( "standard" ),
				Continuous Scale( 0 ),
				Make Window With Legend( 1 )
		)
	)
);
myWin << Journal;
myWin << Close Window();
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: jsl close window does not close window in jmp14

It appears to be a change.....and you may want to report it as a bug.....but here is a work around

names default to here(1);
dt0=open("$SAMPLE_DATA/big class.jmp");
myColor="sex";


myWin = Outline Box( "Legend",
		H List Box(
			myPlot = dt0 << Color or Mark By Column(
				Eval( myColor ),
				Color Theme( "POR Black" ),
				Marker Theme( "standard" ),
				Continuous Scale( 0 ),
				Make Window With Legend( 1 )
		)
	)
);
myWin << Journal;
window("Legend") << Close Window();
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: jsl close window does not close window in jmp14

It appears to be a change.....and you may want to report it as a bug.....but here is a work around

names default to here(1);
dt0=open("$SAMPLE_DATA/big class.jmp");
myColor="sex";


myWin = Outline Box( "Legend",
		H List Box(
			myPlot = dt0 << Color or Mark By Column(
				Eval( myColor ),
				Color Theme( "POR Black" ),
				Marker Theme( "standard" ),
				Continuous Scale( 0 ),
				Make Window With Legend( 1 )
		)
	)
);
myWin << Journal;
window("Legend") << Close Window();
Jim
hlazar
Level III

Re: jsl close window does not close window in jmp14

Thank you, this does indeed work.
gzmorgan0
Super User (Alumni)

Re: jsl close window does not close window in jmp14

I don't believe there is a change in JMP14. The option Make Window with Legend(1) is creating a window, but it is not myWin, it is an independent window called Legend.  Below is a modification of Jim's script to demonstrate this subtle issue.  Change the OutlineBox name to My Legend. The New Window () command s not needed, it is for demonstration. Bottom line is Make Window with Legend() creates an independent window, and it is unneccesary.

names default to here(1);
dt0=open("$SAMPLE_DATA/big class.jmp");
myColor="sex";

myWin=0;

myWin = Outline Box( " My Legend",
		H List Box(
			myPlot = dt0 << Color or Mark By Column(
				Eval( myColor ),
				Color Theme( "POR Black" ),
				Marker Theme( "standard" ),
				Continuous Scale( 0 ),
				//Make Window With Legend( 1 )
		)
	)
);
myWin << Journal;
wait(0);



new window("show it", myWin);
wait(2);

myWin << close window();

 

Recommended Articles