cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar
AdamChoen
Level IV

Make included scripts have their own context (Run several dynamic user interface)

Hi,
I have several dynamic UIs that I launch through script buttons on my journal.

Each button simply runs an Include() of the relevant JSL file, for example:

Set Function(Include(
	"....\UIs\xxx_StationMonitor_Raw.jsl")
)

When I launch a second UI, the first one is no longer dynamic (its interactivity stops responding).

However, if I open both JSL files directly in JMP and run them manually, both remain fully dynamic and responsive.

It seems that running multiple includes from a journal somehow causes them to “override” each other’s state.
Is there a recommended way to launch multiple independent UI scripts from the same journal so that all remain active?

Thanks,
Adam

Thanks, Adam
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Run several dynamic user interface

Include() does offer some optional arguments which can sometimes be helpful: << New Context and << Names Default To Here, (Include("pathname", <named arguments> and  Scripting Guide > Programming Methods > Advanced Programming Concepts > Include a Script ) but I'm not sure if these are the solution for the issue you are having.

 

Like Craige suggested, sharing some examples will make it easier to provide ideas.

-Jarmo

View solution in original post

4 REPLIES 4
Craige_Hales
Super User

Re: Run several dynamic user interface

I think the included JSL scripts are probably all sharing the journal's window context (which means they share JSL variables). Compare that to opening each script in its own window...each script has its own context from its JSL window.

If that sounds right, probably a small example (two scripts and a journal) will help someone suggest an answer that won't require a lot of re-work.

Craige
jthi
Super User

Re: Run several dynamic user interface

Include() does offer some optional arguments which can sometimes be helpful: << New Context and << Names Default To Here, (Include("pathname", <named arguments> and  Scripting Guide > Programming Methods > Advanced Programming Concepts > Include a Script ) but I'm not sure if these are the solution for the issue you are having.

 

Like Craige suggested, sharing some examples will make it easier to provide ideas.

-Jarmo
AdamChoen
Level IV

Re: Run several dynamic user interface

Thanks! Adding <<  New Context, solved the issue.

Thanks, Adam
AdamChoen
Level IV

Re: Run several dynamic user interface

---deleted---


Thanks, Adam

Recommended Articles