大家好,
我有以下问题:我在参数_概览窗户。 这些选项卡是在“for”循环中生成的。 但是,在最后一个选项卡之后,我想再创建一个在 for 循环之外创建的选项卡。 从“for”循环中生成制表符效果很好,但添加最后一个制表符却不行。 如果我手动选择最后一个选项卡的代码并执行它,那么所需的选项卡也会显示在窗口中。 用于在“for”循环中创建选项卡数据表dt_run用来。 为了创建最后一个选项卡,使用了另一个表: zuv_data . 如何激活最后一个标签的生成? 我将不胜感激如何做到这一点的提示和建议。为了简化代码结构,我删除了每个图是如何创建的内容。
此致。
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
)
)
)
);谢谢!,它正在工作。 我完全没有注意到 For() 循环中的错误。 这就是它无法显示最后一个选项卡的原因。 此致
我填写了您的示例脚本,并更正了几个语法问题,并且代码运行没有错误。
错误
- 您的 For() 循环是一个无限循环。永远不会到达您的代码的结束元素。
For( iRun = 1, nitems(run_list), iRun++,
它需要是For( iRun = 1, iRun <= nitems(run_list), iRun++,
- 在 For 循环中匹配“)”时出现问题
这是我对代码的返工
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 ) )
)
)
)
)
);