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" );
If you change the text for the Cancel button to "Abbrechen" (German for Cancel) it works fine.
If you change the text for the Cancel button to "Abbrechen" (German for Cancel) it works fine.
thanks Jim! this works perfect. very obvious once you know :)
best regards,
Ivo
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
Seems like it. Any robust way to do it, to ensure the script works regardless of installation language?
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" );
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...");