Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 itcl delete 命令删除对象和类。但是,tcl 解释器说“无效的命令名”删除“。这是部分代码片段。
% itcl::find classes datapath point datapath_point itcl::find objects datapath_point0 datapath_point1 datapath0 % itcl::delete object datapath_point0 invalid command name "delete"
谢谢,博普
有了 Peter 的评论,我可以在我的代码中查找错误。在其中一个基类中,我有以下代码。
destrutor { delete object $this }
在这里,删除命名空间丢失了。即使您添加了“itcl::delete”,您也会遇到另一个错误。简单而正确的解决方案应该是一个空的析构函数。
destructor { }