cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

prev sib - how?

hogi
Level XII

I want to get in this display tree from the Axis Box to the TextEditBox:

 

hogi_0-1717254631475.png

 

but with the below code, I get stuck at step 2: going to the previous sibling:

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(

	Variables( X( :height ), Y( :weight )),
	Elements( Points( X, Y) )
);
	
show(start= report(gb)["Graph Builder",AxisBox(1)]);
show(step1 = start << parent());
show(step2 = step1 << Prev Sib()); // -> empty. doesn't work
show(step3 = step2 << child());

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: prev sib - how?

The Properties Widow does not appear to show all levels of the hierarchy.  The Show Tree Structure window has an additional layer that needs to be traversed to get to the TextBox() you are looking for

 

txnelson_0-1717258107284.png

I was able to get to the TextBox() with the below modifications to your illistration

show(start= report(gb)["Graph Builder",AxisBox(1)]);
show(step1 = start << parent());
show(step2 = step1 << parent());
show(step3 = step2 << Prev Sib()); 
show(step4 = step3 << child());
show(step5 = step4 << child());

which has the below results

start = Report(gb)["Graph Builder",AxisBox(1)] = DisplayBox[AxisBox];
step1 = start << parent() = DisplayBox[GraphBuilderAxisBox];
step2 = step1 << parent() = DisplayBox[GraphBuilderComponentBox];
step3 = step2 << Prev Sib() = DisplayBox[GraphBuilderComponentBox];
step4 = step3 << child() = DisplayBox[GraphBuilderTitleBox];
step5 = step4 << child() = DisplayBox[TextEditBox];
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User


Re: prev sib - how?

The Properties Widow does not appear to show all levels of the hierarchy.  The Show Tree Structure window has an additional layer that needs to be traversed to get to the TextBox() you are looking for

 

txnelson_0-1717258107284.png

I was able to get to the TextBox() with the below modifications to your illistration

show(start= report(gb)["Graph Builder",AxisBox(1)]);
show(step1 = start << parent());
show(step2 = step1 << parent());
show(step3 = step2 << Prev Sib()); 
show(step4 = step3 << child());
show(step5 = step4 << child());

which has the below results

start = Report(gb)["Graph Builder",AxisBox(1)] = DisplayBox[AxisBox];
step1 = start << parent() = DisplayBox[GraphBuilderAxisBox];
step2 = step1 << parent() = DisplayBox[GraphBuilderComponentBox];
step3 = step2 << Prev Sib() = DisplayBox[GraphBuilderComponentBox];
step4 = step3 << child() = DisplayBox[GraphBuilderTitleBox];
step5 = step4 << child() = DisplayBox[TextEditBox];
Jim
hogi
Level XII


Re: prev sib - how?

Thank you, Jim