Qualcuno ha mai notato che quando si memorizzano più riferimenti a oggetti in un elenco, in realtà non si ottiene il riferimento all'oggetto...?
per esempio
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);
produzione:
lista[1] = gb;
list2[1] = Generatore di grafici[];
gb = Generatore di grafici[];
Il primo elenco fornisce il nome della variabile. Non è utile per effettuare chiamate.
Utilizzare Eval List() ( Guida alla creazione di script > Strutture dati > Elenchi negli script JSL > Valuta elenchi )
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"}));
L'hai fatto sembrare troppo facile. Grazie!