Hi JMP Community,
I want to extract items from an existing Journal based on their Collapsed / Expanded status. I tried to use the "Root << is collapsed (Node)" method but it is returning an empty value independently of Collapsed/Expanded status (see JSL work in progress below).
(JMP 16.1, Windows 10 Pro)
Questions:
- Is the "<< is Collapsed" method applicable to journal structures?
- If it does, what is its correct usage, especially regarding "root" and "node" definitions?
- If it does not, what alternative could I use to return the collapsed status of a Journal item?
Names Default to Here (1);
winlist = Window () << Get Window Title ();
For( i = N Items( winlist ), i > 0, i--,
If( (Window( winlist[i] ) << Window Class Name) != "Journal",
Remove From( winlist, i )
)
);
If (N items (winlist) == 0, New Window ("ERROR", Text Box ("!!!! NO JOURNAL CURRENTLY OPENED !!!!")); throw (1));
dw = New Window (" PICK A JOURNAL ",
<< MODAL,
V List Box (
Text Box (" SELECT A JOURNAL"),
wl = List Box ( winlist,
Width (500),
Max Selected (1),
nlines (10)
),
Text Box (" Enter number of plots per row"),
nbe = Number Edit Box (5),
Text Box (" REMOVE LEGEND? "),
rb = Radio Box( {"YES", "NO"}),
Text Box (" PLOT ONLY EXPANDED? "),
rb2 = Radio Box( {"YES", "NO"}),
Button Box ("OK", jrn_l = (wl << get selected); npr = nbe << get (); lg_x = rb << get (); ex_x = rb2 << get (); switch = 1),
Button Box ("CANCEL", switch = 0; Throw(1))
),
);
show (jrn_l);
show (npr);
show (lg_x);
show (ex_x);
If (switch == 0, Throw (1));
jrn = Get Window (jrn_l [1]);
show (jrn);
nplot = N Items (jrn << Xpath ("//OutlineBox"));
dummy = Lineup Box(N Col (1));
win = New window ("PLOTS",
mybox = Lineup Box (N Col (npr))
);
For (i = 1, i<= nplot, i++,
collp = jrn << is collapsed (OutlineBox (i));
show (collp);
if (collp == 1,
dummy = Lineup Box(N Col (1));
Plot = jrn [PictureBox (i)];
dummy << Append (Plot);
if(lg_x == 1,
zzz = Dummy << Xpath ("//LegendBox");
zzz << delete
);
mybox << Append (Dummy)
)
);
Thank you.
Best,
TS
Thierry R. Sornasse