Hola todos,
Tengo el siguiente problema: estoy creando una serie de pestañas dentro del Param_Overview ventana. Esas pestañas se generan en un bucle "for". Sin embargo, después de la última pestaña, me gustaría crear una pestaña más fuera del ciclo for. La generación de pestañas del ciclo "for" funciona bien, pero la adición de la última no. Si selecciono a mano el código de la última pestaña y lo ejecuto, la pestaña deseada también aparece en las ventanas. Para crear las pestañas en el ciclo "for" de la tabla de datos dt_run se utiliza. Para crear la última pestaña se utiliza otra tabla: zuv_data . ¿Cómo activar la generación de la última pestaña? Agradecería sugerencias y sugerencias sobre cómo hacerlo.Eliminé el contenido de cómo se crea cada gráfico para simplificar la estructura del código.
Atentamente.
New Window( "Param_Overview", tb = Tab Box() );
For( iRun = 1, nitems(run_list), iRun++,
tb << Add(
//todo
Lineup Box( N Col( 1 ),
Outline Box( "Graph1",
H List Box(
dt_run << Graph Builder(
// todo
)
),
dt_run << Graph Builder(
// todo
)
)
)
),
Outline Box( "Graph2",
hlistbox = H List Box(
dt_run << Graph Builder(
// todo
)
),
dt_run << Tabulate(
// todo
)
)
)
)
)
);
// the last tab
tb << Add("last tab", //add one more tab
Outline Box( "Last_Graph",
H List Box(
zuv_data << Graph Builder(
// todo
)
)
)
);Completé su script de ejemplo, corrigí un par de problemas de sintaxis y el código se ejecuta sin errores.
Errores
- Tu bucle For () es un bucle infinito.El elemento final de su código nunca se alcanza.
For( iRun = 1, nitems(run_list), iRun++,
Necesita serFor( iRun = 1, iRun <= nitems(run_list), iRun++,
- Hubo un problema con la coincidencia de ")" en el bucle For
Aquí está mi reelaboración del código.
Names Default To Here( 1 );
dt_run = open("$SAMPLE_DATA/big class.jmp");
zuv_data = open("$SAMPLE_DATAbig class families.jmp");
run_list = {a, b};
New Window( "Param_Overview", tb = Tab Box() );
For( iRun = 1, iRun <= N Items( run_list ), iRun++,
tb << Add(
//todo
Lineup Box( N Col( 1 ),
Outline Box( "Graph1",
H List Box(
dt_run << Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ) )
)
),
dt_run << Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ) )
)
)
),
Outline Box( "Graph2",
hlistbox = H List Box(
dt_run << Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ) )
)
),
dt_run << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :height, :weight ), Statistics( Mean ) ),
Row Table( Grouping Columns( :age ) )
)
)
)
)
);
// the last tab
tb << Add(
"last tab", //add one more tab
Outline Box( "Last_Graph",
H List Box(
zuv_data << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :height, :weight ), Statistics( Mean ) ),
Row Table( Grouping Columns( :age ) )
)
)
)
)
);