Subscribe Bookmark RSS Feed

Is it possible to use for() loop inside a new window() call ?

tsl

Community Trekker

Joined:

Jun 23, 2011

I would like to write code like this :

myWin = New Window("window name",

  for(i=1, i<= NItems(myList), i++,

    outlinebox("New outline box for "||mylist,

      // add some content

     ),

  )

);

I don't know beforehand how many items will be in the list ( it comes from a user entry dialog ).

A bunch of graphs get generated from a dataset based on the user's selections of parameters to chart.

I want to collate all the graphs together in a  custom fashion with a list of outlineboxes for each parameter in the list.

If I manually add a couple of them it is fine, even if using indexing subscripts to access the content I want which is referenced in a list, but when I wrap a for loop around the outlinebox() call I get an empty window.

Curious if anybody knows if it's possible to make this kind of an algorithm work. ( I'm using JMP 9.0.2 )

thanks

Thomas

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

You can add content to a window by by sending the APPEND message to it:

nw = New Window( ... );

nw << Append( myContent );

where for your situation the myContent will the the outline boxes.  For multiple items you put the append message into the For loop.

Dave

-Dave
2 REPLIES
Solution

You can add content to a window by by sending the APPEND message to it:

nw = New Window( ... );

nw << Append( myContent );

where for your situation the myContent will the the outline boxes.  For multiple items you put the append message into the For loop.

Dave

-Dave
tsl

Community Trekker

Joined:

Jun 23, 2011

Thanks Dave, this works a charm ! I did not know about the Append message - that opens up a world of possibilities !

Thomas