cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
nikles
Level VI

What is the difference between <

Hi.  I'm curious if any can tell me what is the difference between the <<Sib and <<Next commands?  I'm designing a gui and I've noticed both commands will return the display box that immediately follows the current db.  Do they do anything differently, or can they be used interchangeably?

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII

Re: What is the difference between <

There are cases where it's the same. But for the last child of a parent,

hogi_0-1726695095590.png

<< sib will return empty() and << next will walk to the next level:

// the same:
New window("v1", mainLB = HList box(x = V list box( tb1 = Text Box("v1"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)]  << next()) << select;

New window("v2", mainLB = HList box(x = V list box( tb1 = Text Box("v2"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)] << sib()) << select;

 

// << next walks to the next level and returns tb3
New window("v3", mainLB = HList box(x = V list box( tb1 = Text Box("v3"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)]  << next()) << select;

// << sib returns Empty - and select will fail
New window("v4", mainLB = HList box(x = V list box( tb1 = Text Box("v4"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)] << sib()) << select;

 

View solution in original post

2 REPLIES 2
hogi
Level XII

Re: What is the difference between <

There are cases where it's the same. But for the last child of a parent,

hogi_0-1726695095590.png

<< sib will return empty() and << next will walk to the next level:

// the same:
New window("v1", mainLB = HList box(x = V list box( tb1 = Text Box("v1"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)]  << next()) << select;

New window("v2", mainLB = HList box(x = V list box( tb1 = Text Box("v2"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)] << sib()) << select;

 

// << next walks to the next level and returns tb3
New window("v3", mainLB = HList box(x = V list box( tb1 = Text Box("v3"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)]  << next()) << select;

// << sib returns Empty - and select will fail
New window("v4", mainLB = HList box(x = V list box( tb1 = Text Box("v4"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)] << sib()) << select;

 

nikles
Level VI

Re: What is the difference between <

Thanks @hogi .  Makes sense.