JSL MouseBox doesn't save to Journal JMP 17 vs JMP 16
Hello,
I am using a scrip that saves a report in a journal and have noticed a change between JMP 16 and JMP 17 that breaks some of its functionality. If I save a window to the journal in JMP 16, the MouseBox interactions work just like they did in the JMP window, but in JMP 17 I've found that MouseBox doesn't save to the journal at all. Is this an intended change? Any ideas on possible workarounds or better way to be saving the report?
I put together a simple test script to compare between JMP 16 and JMP 17 and verified the behavior. I don't have access to JMP 18 yet, but I'm guessing it would be the same as JMP 17. I'm using JMP 16 Pro, but I know it also works in JMP 16.
JMP versions:
JMP Pro 16.0.0
JMP 17.2.0
names default to here (1);
NewWin = New Window ("mouse box test",
mb = MouseBox(
tb = text box("click me"),
<<SET click="" enable=""></SET>Automation and ScriptingSharing and Communicating ResultsRe: JSL MouseBox doesn't save to Journal JMP 17 vs JMP 16Do you need to utilize Mouse Box()? Button Box() could be easier option
Names Default To Here(1);
New Window("Example", Button Box("Press Me", Print("Pressed.")));
Also this small change might prevent the mouse box from breaking and will keep it in journal but I'm not sure if you can build it this way (create window as journal window)

Re: JSL MouseBox doesn't save to Journal JMP 17 vs JMP 16I'm using MouseBox() so that an image can be interacted with, not just text like in my simple example. Clicking on any of the images in the grid opens up a larger version of the image and gives some additional options. I suppose I could embed the same code into a Button Box(), but it would take up space on an already dense report.
Re: JSL MouseBox doesn't save to Journal JMP 17 vs JMP 16ah... half of my message was left out (property tree is there but no script example)! It seems like you can keep the mouse box if you initialize your window as journal window (<< Journal)
Names Default To Here(1);
nw = New Window("mouse box test", << journal, /*Type("Journal")*/
mb = MouseBox(
tb = text box("click me"),
<<SET click="" enable=""></SET>Re: JSL MouseBox doesn't save to Journal JMP 17 vs JMP 16Thanks for your follow up Jarmo,
I've been playing around with this off and on, to clarify in the small chance that someone else has this issue, while opening the new window as a journal window does indeed initially work as expected, actually saving then re-opening the journal strips it of any Mouse Box instance again. I have found that opening a previously saved Journal from JMP 16 with a working Mouse Box, then saving with JMP 17 strips the Mouse Box as well. This seems to be a change to how Journals are handled in JMP 17.
I slightly modified my demo script to contain an image
names default to here (1);
NewWin = New Window ("mouse box test",
mb = MouseBox(
tb = pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) ),
<<SET click="" enable=""></SET>