为什么从自定义调色板运行 ClearAll[“Global`*”] 不更新局部变量颜色?
我创建了一个自定义调色板,其中包含执行 ClearAll["Global`*"]
的 ActionMenu
。它执行所需的操作,但前端不会立即将颜色从黑色更新为蓝色(标准),就像直接从笔记本单元执行 ClearAll["Global`*"]
时发生的情况一样(它仅在执行其他操作后更新)。有没有办法启动前端显示状态的刷新?
编辑:显然,当我从调色板加载包时也会发生同样的情况(蓝色不会立即更新为黑色)。
I created a custom palette, with an ActionMenu
that executes ClearAll["Global`*"]
. It performs the desired action, but the frontend doesn't instantly update the colors from black to blue (standard), as it happens when ClearAll["Global`*"]
is executed directly from a notebook cell (it only updates after something else has been executed). Is there a way to initiate a refresh of the frontend display status?
EDIT: Apparently, the same happens when I load a package from a palette (blue doesn’t immediately update to black).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不完全优雅,但它可以工作(主循环必须在 ClearAll 之后调用一次):
当然,应该使用新的 Mathematica 8 NotebookEvaluate 函数,但似乎不是
在这里工作(即
给出错误消息
Not exactly elegant, but it works (the main loop has to be called once after ClearAll):
Of course, one should use the new Mathematica 8 NotebookEvaluate function, but it seems not
to work here (i.e.,
gives an error message