DXL 门:找出模块仍然打开的原因

问题描述

我在脚本末尾使用此循环来检测是否仍有模块打开:

for module_in_database in database do 
{   
    logResult = logResult "INFO: open modules at the end the script are " fullName(module_in_database) "\n"
}

然后在我的(相当复杂的脚本)结束时,我仍然打开那些模块:

INFO: open modules at the end the script are /spec_fpga/spec_fpga
INFO: open modules at the end the script are /spec produit/spec_produit
INFO: open modules at the end the script are /spec produit/spec_produit
INFO: open modules at the end the script are /spec_fpga/_conf/OBJ_satisfies_OBJ
INFO: open modules at the end the script are /spec_fpga/_conf/OBJ_satisfies_OBJ

我能做些什么来关闭它们,甚至更好地理解为什么仍然打开(识别链接到它们的变量的名称?) 打开链接模块是否正常?我不打开这样的链接模块。它们是否随下游模块自动打开? 我什至不知道它是一个开放的模块还是一个模块的基线。

解决方法

我不确定为什么 spec_produit 和 OBJ_satisfies_OBJ 出现两次,spec_produit 之一(正式模块?)可能是单独的基线,但对于像 OBJ_satisfies_OBj 这样的链接模块,很少有基线。 您可能会通过启动“工具→管理打开的模块”并在脚本运行时查看列表来了解您的模块何时打开。也许您想为此使用 DXL 调试器。 一般情况下,当一个包含out链接的正式模块被打开时,链接模块会自动打开,但通常当正式模块关闭时它们会再次自动关闭。当正式模块包含 in 链接并打开到该模块的 out 链接时,可以打开它们。您可能有一个带有(默认)视图的模块,该视图遵循其所有输出链接。或者模块中的触发器或 DXL 属性可能会执行类似的操作。

您可能需要查看 isBaseline moduleVersion module_in_databaseversionString moduleVersion module_in_database 以获取更多信息。

要关闭它们,只需使用 close module_in_database

附带说明:在 DXL 中,关闭当前循环的内容从来都不是一个好主意,因此您想使用这样的临时跳过列表:

Skip closeMe = create
for module_in_database in database do {
    logResult = logResult "INFO: currently open: " (fullName module_in_database) ((isBaseline (moduleVersion module_in_database)) ? " Baseline " (versionString moduleVersion module_in_database) : " (current version)") "\n"
    put (closeMe,module_in_database,module_in_database)
}
Module m 
for m in closeMe do {
    if open (module m) then {
        logResult = logResult "INFO: closing " fullName m "\n"
        close m
}   }
delete closeMe

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...