Subscribe Bookmark RSS Feed

Find Hidden or Displayed FrameBoxes

robot

Community Trekker

Joined:

Feb 27, 2012

Hi,

Ian@JMP​ shared a JSL function (below; originally written by Joseph Morgan) that will return a list of each FrameBox, whether it is displayed or not.  The function works great, but I would like to be able to access only FrameBoxes that are displayed.  What is the best way for JSL to determine if a FrameBox is displayed or not?  I am using JMP12.

Thanks!

NamesDefaultToHere(1);

ClearLog();

// This function recursively traverses a display tree producing

// a pre-order listing of the names of display boxes that constitute

// the tree. It also looks for each FrameBox (whether displayed or not),

// and gets the name of the parent OutlineBox

preorder = Function({node},

   Local({chnode},

    // Inspect the current node

    nodeType = Char(node << className);

      Print("Node: "||nodeType);

      If(nodeType =="FrameBox",

  // Find the title of the parent outline node of this FrameBox

  parent = node << parent;

  parentType = Char(parent << className);

  While(parentType != "OutlineBox",

  parent = parent << parent;

  parentType = Char(parent << className);

  );

  InsertInto(fbTitles, parent << getTitle)

  );

    // Do the recusrsion

      chnode = node << child;

      While(IsScriptable(chnode),   

         Recurse(chnode);

         chnode = chnode << sib;   

      );

   );

);

// Try out 'preorder' . . .

dt = Open("$SAMPLE_DATA/Big Class.jmp");

obj = dt << Fit Model(

  Y( :height ),

  Effects( :sex ),

  Personality( "Standard Least Squares" ),

  Emphasis( "Effect Leverage" ),

  Run(

  :height << {Lack of Fit( 0 ), Plot Actual by Predicted( 1 ),

  Plot Regression( 0 ), Plot Residual by Predicted( 1 ),

  Plot Effect Leverage( 1 )}

  )

  );

report=report(obj);

fbTitles = {};

preorder(report);

Print("\!n", fbTitles);

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

This question is answered.  Please see discussion at:

Find All Display Tree Elements

1 REPLY
Solution

This question is answered.  Please see discussion at:

Find All Display Tree Elements