Esiste una funzione che può sostituire l'intera tabella all'interno di una tabella?Ho una casella di tabella vuota / predefinita popolata, e volevo sostituire l'intera tabella usando lo script di seguito. C'è un modo per aggiornare [table box] con
Questo script che sto usando ora è noioso:
button box("UPDATE",
dtmain = Open(filename, invisible);
tb << delete row( 1 );
tb << delete row( 1 );<BR /> // 50 lines of delete row()<BR />
tb << insert row( 1, {"a", 1} );
tb << insert row( 1, {"b", 2} ); <BR /> // 50 lines of insert row()
);Grazie in anticipo:)
Ri: C'è una funzione che può sostituire l'intera tabella all'interno di una scatola di tabella?Ho trovato che è più facile eliminare e sostituire la tabella, piuttosto che aggiornare. Il semplice script qui sotto illustra questa metodologia
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
New Window( "The Table",
vlb = V List Box(),
theButton = Button Box( "UPDATE",
Try( theTable << delete );
theList = {};
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
theTable = Table Box( String Col Box( "Name", theList ) );
vlb << append( theTable );
)
);
// Initialize the table
theList = {};
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
Insert Into( theList, dt:Name[Random Integer( 1, 40 )] );
theTable = Table Box( String Col Box( "Name", theList ) );
vlb << append( theTable );