if self.state == 'unchanged':
return self.valid
for type_permis in self.definition.type:
- if type_permis.__class__.__name__ == 'Matrice' :
+ if hasattr(type_permis, "__class__") and type_permis.__class__.__name__ == 'Matrice':
self.monType=type_permis
return self.valideMatrice(cr=cr)
return Validation.V_MCSIMP.MCSIMP.isvalid(self,cr=cr)
else :
self.bParametres.close()
type = mc.type[0]
- if not(('grma' in repr(type)) or ('grno' in repr(type))) or not(self.editor.salome) :
+ enable_salome_selection = self.editor.salome and \
+ (('grma' in repr(type)) or ('grno' in repr(type)) or
+ (hasattr(type, "enable_salome_selection") and type.enable_salome_selection))
+ if not enable_salome_selection:
self.BSalome.close()
+ if not(('grma' in repr(type)) or ('grno' in repr(type))) or not(self.editor.salome) :
self.BView2D.close()
def InitLineEditVal(self):
'I' : "Un entier est attendu",
'Matrice' : 'Une Matrice est attendue',
'Fichier' : 'Un fichier est attendu'}
- type = mc.type[0]
- commentaire=d_aides.get(type,"Type de base inconnu")
+ mctype = mc.type[0]
+
+ if type(mctype) == types.ClassType:
+ commentaire = getattr(mctype, 'help_message', "Type de base inconnu")
+ else:
+ commentaire = d_aides.get(mctype, "Type de base inconnu")
aideval=self.node.item.aide()
commentaire=commentaire +"\n"+ QString.toUtf8(QString(aideval))
self.Commentaire.setText(QString.fromUtf8(QString(commentaire)))