cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3B%20%E5%92%8C%E6%9C%89%E4%BB%80%E9%BA%BC%E5%B7%AE%E5%88%A5%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%E3%80%82%E6%88%91%E5%BE%88%E5%A5%BD%E5%A5%87%E6%98%AF%E5%90%A6%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E5%91%8A%E8%A8%B4%E6%88%91%20%26lt%3B%20%E4%B9%8B%E9%96%93%E6%9C%89%E4%BB%80%E9%BA%BC%E5%8D%80%E5%88%A5%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%20commands%3D%22%22%3E%3CLINGO-LABS%20id%3D%22lingo-labs-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FLINGO-SUB%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800084%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERe%3A%20What%20is%20the%20difference%20between%20%26lt%3B%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800084%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E4%B9%9F%E6%9C%89%E7%9B%B8%E5%90%8C%E7%9A%84%E6%83%85%E6%B3%81%E3%80%82%E4%BD%86%E5%B0%8D%E7%88%B6%E6%AF%8D%E7%9A%84%E6%9C%80%E5%BE%8C%E4%B8%80%E5%80%8B%E5%AD%A9%E5%AD%90%E4%BE%86%E8%AA%AA%EF%BC%8C%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1726695095590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1726695095590.png%22%20style%3D%22width%3A%20252px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68442i6F4B864E81D53176%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1726695095590.png%22%20alt%3D%22hogi_0-1726695095590.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26lt%3B%26lt%3B%20sib%20%E5%B0%87%E5%82%B3%E5%9B%9Eempty()%EF%BC%8C%26lt%3B%26lt%3B%20next%20%E5%B0%87%E9%80%B2%E5%85%A5%E4%B8%8B%E4%B8%80%E5%80%8B%E5%B1%A4%E7%B4%9A%EF%BC%9A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20the%20same%3A%0ANew%20window(%22v1%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v1%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(1)%5D%20%20%26lt%3B%26lt%3B%20next())%20%26lt%3B%26lt%3B%20select%3B%0A%0ANew%20window(%22v2%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v2%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(1)%5D%20%26lt%3B%26lt%3B%20sib())%20%26lt%3B%26lt%3B%20select%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20%26lt%3B%26lt%3B%20next%20walks%20to%20the%20next%20level%20and%20returns%20tb3%0ANew%20window(%22v3%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v3%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(2)%5D%20%20%26lt%3B%26lt%3B%20next())%20%26lt%3B%26lt%3B%20select%3B%0A%0A%2F%2F%20%26lt%3B%26lt%3B%20sib%20returns%20Empty%20-%20and%20select%20will%20fail%0ANew%20window(%22v4%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v4%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(2)%5D%20%26lt%3B%26lt%3B%20sib())%20%26lt%3B%26lt%3B%20select%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%26lt%3B%20%E4%B9%8B%E9%96%93%E6%9C%89%E4%BB%80%E9%BA%BC%E5%8D%80%E5%88%A5%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%AC%9D%E8%AC%9D%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26800%22%20target%3D%22_blank%22%3E%40hogi%3C%2FA%3E%20%E3%80%82%E6%9C%89%E9%81%93%E7%90%86%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FLINGO-SUB%3E%3C%2FLINGO-SUB%3E
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 XIII

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 XIII

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.

Recommended Articles