graphics/FBD_Objects.py
changeset 383 25ffba02b6a8
parent 379 e4c26ee9c998
child 388 7ea1f5094df3
--- a/graphics/FBD_Objects.py	Fri Jul 24 09:55:11 2009 +0200
+++ b/graphics/FBD_Objects.py	Fri Jul 24 10:47:35 2009 +0200
@@ -572,7 +572,12 @@
     
     # Returns all the block connectors 
     def GetConnectors(self):
-        return {"input" : self.Input, "output" : self.Output}
+        connectors = {"inputs": [], "outputs": []}
+        if self.Input:
+            connectors["inputs"].append(self.Input)
+        if self.Output:
+            connectors["outputs"].append(self.Output)
+        return connectors
     
     # Changes the negated property of the variable connector if handled
     def SetConnectorNegated(self, negated):
@@ -785,6 +790,15 @@
     def GetConnector(self, position = None, name = None):
         return self.Connector
     
+        # Returns all the block connectors 
+    def GetConnectors(self):
+        connectors = {"inputs": [], "outputs": []}
+        if self.Type == CONNECTOR:
+            connectors["inputs"].append(self.Connector)
+        else:
+            connectors["outputs"].append(self.Connector)
+        return connectors
+    
     # Changes the variable type
     def SetType(self, type):
         if type != self.Type: