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
ivo
ivo
Level II

JMP pro 15 modal window how to close

Hi, if I run below script in JMP pro 15 with german language the window does not close when I click on cancel. Same script under english language works well. And even in JMP14 (german and english) the window is closed after click on cancel. Any idea how to get this modal window closed in JMP 15 german as well?

Thanks in advance,

Ivo

 

 

nw = New Window( "Test",
	<<Modal,
	Text Box( "Press OK to do something." ),
	H List Box(
		Button Box( "OK" ),
		Button Box( "Cancel" )
	)
);

// If cancel or X was clicked, stop the script
If( nw == {Button( -1 )}, Stop() );

Print( "Do something" );
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: JMP pro 15 modal window how to close

If you change the text for the Cancel button to "Abbrechen" (German for Cancel) it works fine.

Jim

View solution in original post

8 REPLIES 8
txnelson
Super User

Re: JMP pro 15 modal window how to close

If you change the text for the Cancel button to "Abbrechen" (German for Cancel) it works fine.

Jim
ivo
ivo
Level II

Re: JMP pro 15 modal window how to close

thanks Jim! this works perfect. very obvious once you know

best regards,

Ivo

ThomasZatValcon
Level III

Re: JMP pro 15 modal window how to close

Hi Jim

 

Does that mean that a script with a "Cancel" button will not work when the script is run on JMP in a German locale or installation?

 

Kind regards

Thomas

txnelson
Super User

Re: JMP pro 15 modal window how to close

I assume that one would have to use the German word for Cancel if the installed version of JMP is using the Germain version of JMP
Jim
ThomasZatValcon
Level III

Re: JMP pro 15 modal window how to close

Seems like it. Any robust way to do it, to ensure the script works regardless of installation language?

Beef4Dinner
Level I

Re: JMP pro 15 modal window how to close

There is an option to force text processing in a specific language. Here is the entry in the scripting index: 

 

Language

obj << Language( English | German | Spanish | French | Italian | Japense | Chinese (Simplified) | Chinese (Traditional) );

Specifies the language used for text processing. This affects stemming and the built-in lists of stop words, recodes, and phrases.

 

Ex:

dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
	TextColumns( :Reasons Not to Floss )
);
obj << Language( "German" );

 

 

 

txnelson
Super User

Re: JMP pro 15 modal window how to close

I do not see any way to programmatically set the language preference
Jim

Re: JMP pro 15 modal window how to close

Hi,

 

I think the code below should be language-independent.

 

Cheers,

Brady

 

Names Default To Here(1);

stopRunning = 0;

nw = New Window( "Test",
	<<Modal,
	Text Box( "Press OK to do something." ),
	hlb  = H List Box(
		Button Box( "OK" ),
		Button Box( "Cancel", stopRunning = 1; current window()<< close window )
	)
);

if (stopRunning, stop());

print("Do Something...");