cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
DMR
DMR
Level V

Hidden Windows

Hi - I have a problem with JMP windows opening behind other (non-JMP) applications when I'm running an add-in of mine. The following sequence of steps demonstrates the problem as it occurs on my laptop:

 

  1. I open JMP, and I also open a JMP data set.
  2. I now open some other application (e.g. PowerPoint) and maximize it (so neither the JMP Home Window nor the window containing the data set are immediately visible).
  3. I do something in PowerPoint (e.g. edit a slide or whatever) but then I want to return to my analysis in JMP. So leaving PowerPoint open and maximized, I hover my mouse over the JMP icon at the bottom of the screen, and I select the window containing the data set I want to analyze. This window now sits on top of PowerPoint (although the JMP Home Window is still hidden behind PowerPoint).
  4. I now want to run my add-in, so I select it from the menu at the top of the data set window. The first thing my add-in does is to present a modal dialog window, inviting me to select the columns of my data table that I want to analyze, after which I just click on the "OK" button to proceed. When I call the add-in, the modal dialog window does indeed appear... but both it and the window containing the data set immediately disappear behind PowerPoint (giving the impression to the user that the application has just crashed).

 

I note that if instead of opening the add-in from the data set window, I bring the JMP Home Window to the front first, and then run the add-in from either window, the problem doesn't occur (or to be strictly accurate, the data window still disappears behind PowerPoint, but the modal dialog window remains on top - and the results of the analysis subsequently appear on top also).


I'm thinking that the solution might be to insert a one-line start-up script into the add-in which makes the JMP Home Window the current window (i.e. moving it in front of any other applications that happen to be open) before starting the analysis, but I note that the Get Window List function doesn't include the JMP Home Window within the list - so I can't reference it that way.

 

Can anybody suggest how I can resolve this? (I could of course just tell all the users not to use the add-in in the way described above, but I'd much prefer to prevent the problem from occurring via scripting if at all possible.)

 

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
DMR
DMR
Level V

Re: Hidden Windows

I've now resolved the issue of the hidden windows, so I'll mark this problem as having been solved when I post this.

 

Just for the record, the problem was caused by the data table having been minimized (which was something I'd done purely for cosmetic purposes) prior to the column selection dialog being invoked. If anyone runs into a similar problem in the future, the following short script may help to identify the cause. This would need to be compiled into an add-in, and then called from the main menu above the data table (not from the JMP Home Window) once the data table has been opened from the Windows Taskbar.

 

Names Default to Here(1);

fnSelectColumn = function({dt}, {default local},

	new window("Column Selection", << modal(1),
		clb = ColListBox(dt, all, Output = (clb << get selected), << set max selected(1))
		);

	Output
	);

expr_Load_DT = expr(

	dt = current data table();	
	if(type(dt)=="Empty",
		dt = open(PickFile( "Select the JMP data set to be analyzed:",, {"JMP Data Files|JMP"} ));
		)

	);
	
/*
	================
	START OF PROGRAM
	================
*/

Intro = "There's another full-screen Windows application open right now, and you've just loaded the data table you can see ";
Intro = Intro || "behind this window from the Windows Taskbar, prior to selecting a column for analysis.\!r\!rHowever, the ";
Intro = Intro || "modal window containing the column selection dialog will disappear behind the other Windows application if the ";
Intro = Intro || "data table is minimized prior to the column selection dialog being displayed. (If it hasn't, there's no problem.)";

MinimizeYN = 1;

new window("Minimize the Data Table?", << modal(1),
	VListBox(
		HCenterBox(BorderBox(TextBox(Intro, << padding(5)), << padding(10), << sides(15))),
		SpacerBox(size(0, 10)),
		rb = RadioBox({"Minimize the data table after closing this window", "Don't minimize the data table after closing this window"},
			MinimizeYN = (2 - (rb << get))
			)
		)
	);

expr_Load_DT;

dt << minimize window(MinimizeYN); // THIS line is the one that causes the problem;

Output = fnSelectColumn(dt);

Caption("(You selected \!"" || Output[1] || "\!")"); wait(1.5); caption(remove);

/*
	================
	END OF PROGRAM
	================
*/

 

 

View solution in original post

3 REPLIES 3
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Hidden Windows

I was not able to replicate this on JMP 15.2.1 on windows.  Here is how I call most windows inside menus for add-ins, maybe there is something different than what you are using?

 

Inside addin.jmpcust:

 

          <jm:command>
            <jm:name>ABOUT</jm:name>
            <jm:caption>About</jm:caption>
            <jm:action type="path">$ADDIN_HOME(com.domain.subdomain)\addinAbout.jsl</jm:action>
            <jm:icon type="none"></jm:icon>
          </jm:command>

and somewhere inside the addinAbout.jsl file is a New Window() function.

 

DMR
DMR
Level V

Re: Hidden Windows

Hi IH,


Just to confirm, I'm running this in MS Windows (I don't know if the same issue is apparent on a Mac) and in case the version is relevant, I'm running JMP 15.0.2, so mine predates your JMP 15.2.1 - but I have access to JMP 16EA version 8, and I'm seeing the same behavior there too.

 

In a nutshell, if the JMP Home Window is concealed behind any fully-maximized non-JMP Windows application (I'll just call it "X", as it doesn't seem to make any difference what application it is) when the add-in is run, then any output window generated by the add-in is concealed behind X also. I infer from the above that if I could find a way to bring the JMP Home Window immediately to the fore whenever the add-in is run, the issue would be resolved.

 

I've tried to compare the structure of the addin.jmpcust you posted with the one generated by the Add-In Builder I used, but mine is very considerably longer and I don't know exactly what I'm looking for, so I suspect I'm going to have to create a version of the add-in that's trimmed right down to the bone, and then ask for help again - attaching a copy of the JSL script - when I've done it.

 

I'm acutely aware that something like this is almost impossible to diagnose if it can't be replicated, so I'll report back when I've got something more concrete to go on.

 

Many thanks for your help.

DMR
DMR
Level V

Re: Hidden Windows

I've now resolved the issue of the hidden windows, so I'll mark this problem as having been solved when I post this.

 

Just for the record, the problem was caused by the data table having been minimized (which was something I'd done purely for cosmetic purposes) prior to the column selection dialog being invoked. If anyone runs into a similar problem in the future, the following short script may help to identify the cause. This would need to be compiled into an add-in, and then called from the main menu above the data table (not from the JMP Home Window) once the data table has been opened from the Windows Taskbar.

 

Names Default to Here(1);

fnSelectColumn = function({dt}, {default local},

	new window("Column Selection", << modal(1),
		clb = ColListBox(dt, all, Output = (clb << get selected), << set max selected(1))
		);

	Output
	);

expr_Load_DT = expr(

	dt = current data table();	
	if(type(dt)=="Empty",
		dt = open(PickFile( "Select the JMP data set to be analyzed:",, {"JMP Data Files|JMP"} ));
		)

	);
	
/*
	================
	START OF PROGRAM
	================
*/

Intro = "There's another full-screen Windows application open right now, and you've just loaded the data table you can see ";
Intro = Intro || "behind this window from the Windows Taskbar, prior to selecting a column for analysis.\!r\!rHowever, the ";
Intro = Intro || "modal window containing the column selection dialog will disappear behind the other Windows application if the ";
Intro = Intro || "data table is minimized prior to the column selection dialog being displayed. (If it hasn't, there's no problem.)";

MinimizeYN = 1;

new window("Minimize the Data Table?", << modal(1),
	VListBox(
		HCenterBox(BorderBox(TextBox(Intro, << padding(5)), << padding(10), << sides(15))),
		SpacerBox(size(0, 10)),
		rb = RadioBox({"Minimize the data table after closing this window", "Don't minimize the data table after closing this window"},
			MinimizeYN = (2 - (rb << get))
			)
		)
	);

expr_Load_DT;

dt << minimize window(MinimizeYN); // THIS line is the one that causes the problem;

Output = fnSelectColumn(dt);

Caption("(You selected \!"" || Output[1] || "\!")"); wait(1.5); caption(remove);

/*
	================
	END OF PROGRAM
	================
*/