☑ 很酷的新功能
☑ 可以帮助很多用户!
☑ 删除一些感觉像“错误”的东西
☐ 很高兴有
☐ 没人需要它
是什么启发了这个愿望清单请求?
当用户重命名列时,表脚本会自动更新。
当用户删除表脚本中使用的列时,如果该列在列公式中使用,JMP 会向用户发出警告。
但是表格脚本将会毫无预兆地消亡。
a) 用户需要花很长时间才能发现表脚本失效的原因。
b) 需要花费一些精力才能再次创建该列(最坏的情况是:无法再次创建该列)
您希望看到什么改进?
在删除列之前,请检查该列是否在表脚本中使用 - 并显示警告。
Names Default To Here( 1 );
Current Data Table() << copy table script( "no data" );
tableScript = Eval( Eval Expr( Parse( Expr( Get Clipboard() ) ) ) );
col_names = Current Data Table() << Get Selected Columns();
tableScriptList = Substitute( Name Expr( tableScript ), Expr( New Table() ), Expr( List() ) );
tableScriptList = Filter Each( {part}, tableScriptList, Head( Part ) == Expr( New Script() ) );
found = 0;
For Each( {col}, col_names,
For Each( {myScript}, tableScriptList,
If( Not( Is Empty( Eval( Eval Expr( Extract Expr( myScript, Expr( Name Expr( col ) ) ) ) ) ) ),
Caption( {100, 200}, "column \!"" || (col << get name()) || "\!" found in script: \!n" || Arg( myScript, 1 ) );
found = 1;
print("found!!!");
Wait( 1 );
)
)
);
If( Not( found ),
Caption( {100, 200}, "no column found.\!N ->cols can be deleted" );
Wait( 1 );
);
Caption( remove )
这个想法为什么重要?
试想一下,有多少 JMP 用户因为“意外”删除了一列而终止了表格脚本。
切换到“安全模式”将使许多用户免受同一问题的困扰。
其他愿望