# Classe de base permettant de lire, afficher
# et sauvegarder les fichiers utilisateurs
-class CONFIG(configuration.CONFIG_BASE):
+class CONFIG(configuration.configBase):
def __init__(self,appli,repIni):
# self.labels_eficas = ['lang']
self.labels_eficas = ['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille']
- configuration.CONFIG_BASE.__init__(self,appli,repIni)
+ configuration.configBase.__init__(self,appli,repIni)
self.rep_user = os.environ["HOME"]
self.appli = appli
Convertit un objet MCSIMP en texte python
"""
clef=""
- for i in obj.get_genealogie() :
+ for i in obj.getGenealogie() :
clef=clef+"__"+i
self.dictMCVal[clef]=obj.valeur
def add_AlgorithmParameters(self):
- if "__"+self.type_of_study+"__AlgorithmParameters__Parameters" not in self.dictMCVal: return
-
data_name = "AlgorithmParameters"
data_type = "Dict"
- para_type = self.dictMCVal["__"+self.type_of_study+"__AlgorithmParameters__Parameters"]
+ #
+ if "__"+self.type_of_study+"__AlgorithmParameters__Parameters" in self.dictMCVal:
+ para_type = self.dictMCVal["__"+self.type_of_study+"__AlgorithmParameters__Parameters"]
+ else:
+ para_type = "Defaults"
+ #
if para_type == "Defaults":
from_type = para_type
elif para_type == "Dict":
from_type = self.dictMCVal["__"+self.type_of_study+"__AlgorithmParameters__Dict__data__FROM"]
+ else:
+ return
if from_type == "Script":
data = self.dictMCVal["__"+self.type_of_study+"__AlgorithmParameters__Dict__data__SCRIPT_DATA__SCRIPT_FILE"]
elif from_type == "Defaults":
base = "__"+self.type_of_study+"__AlgorithmParameters__Parameters"
keys = [k for k in self.dictMCVal.keys() if base in k]
- keys.remove(base)
+ if base in keys: keys.remove(base)
keys = [k.replace(base,'') for k in keys]
data = '{'
for k in keys:
# Connect to the jdc
CONNECTOR.Connect(self.eficas_editor.jdc, "valid", self.editorValidEvent, ())
- # Rq on notera que l'on utilise isvalid dans isOk
+ # Rq on notera que l'on utilise isValid dans isOk
# et que isOk appelle editorValidEvent
- # il n'y a pas de boucle infini car isvalid n'émet
+ # il n'y a pas de boucle infini car isValid n'émet
# son signal que si l'état a changé
def editorValidEvent(self):
adaoStudyEditor.updateItem(self.salome_study_id, self.salome_study_item, self)
def isOk(self):
if self.eficas_editor.jdc:
- return self.eficas_editor.jdc.isvalid()
+ return self.eficas_editor.jdc.isValid()
return False
def createYACSFile(self):