Has anyone ever noticed when you store multiple object referances in a list you won't actually get the object referance....?
e.g.
Namesdefault to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder( Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y ), Smoother( X, Y ) ) );
list = {};
list2 = {};
Insert Into(list, {gb, "test", "test2"});
Insert Into(list2, gb);
show(list[1]);
show(list2[1]);
show(gb);
output:
list[1] = gb;
list2[1] = Graph Builder[];
gb = Graph Builder[];
The first list gives you the variable name. Not usefull to make calls on.
Use Eval List() (Scripting Guide > Data Structures > Lists in JSL Scripts > Evaluate Lists )
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), Smoother(X, Y))
);
list = {};
list2 = {};
Insert Into(list, Eval List({gb, "test", "test2"}));
You made that look too easy. Thanks!