plcopen/plcopen.py
changeset 431 c1c92d068ac5
parent 427 22d16c457d87
child 435 893d04aff708
--- a/plcopen/plcopen.py	Mon Sep 21 12:06:51 2009 +0200
+++ b/plcopen/plcopen.py	Tue Sep 22 09:56:02 2009 +0200
@@ -742,8 +742,8 @@
     setattr(cls, "compatibility", compatibility)
     
     def updateElementName(self, old_name, new_name):
-        if self.type == old_name:
-            self.type = new_name
+        if self.typeName == old_name:
+            self.typeName = new_name
     setattr(cls, "updateElementName", updateElementName)
 
 cls = PLCOpenClasses.get("project_types", None)
@@ -1032,7 +1032,7 @@
                     removed = True
                 i += 1
             if not removed:
-                raise ValueError, _("Transition with name %s doesn't exists!")%name
+                raise ValueError, _("Transition with name %s doesn't exist!")%name
     setattr(cls, "removetransition", removetransition)
 
     def addaction(self, name, type):
@@ -1070,7 +1070,7 @@
                     removed = True
                 i += 1
             if not removed:
-                raise ValueError, _("Action with name %s doesn't exists!")%name
+                raise ValueError, _("Action with name %s doesn't exist!")%name
     setattr(cls, "removeaction", removeaction)
 
     def updateElementName(self, old_name, new_name):
@@ -1326,7 +1326,7 @@
                     removed = True
                 i += 1
             if not removed:
-                raise ValueError, _("Instance with id %d doesn't exists!")%id
+                raise ValueError, _("Instance with id %d doesn't exist!")%id
         else:
             raise TypeError, "%s body don't have instances!"%self.content["name"]
     setattr(cls, "removecontentInstance", removecontentInstance)