plugins/svgui/svgui.py
changeset 13 f1f0edbeb313
parent 12 a1f9e514f708
child 20 d3cb5020997b
--- a/plugins/svgui/svgui.py	Tue Aug 21 17:21:26 2007 +0200
+++ b/plugins/svgui/svgui.py	Mon Aug 27 17:54:55 2007 +0200
@@ -2,20 +2,20 @@
 from DEFControler import DEFControler
 from defeditor import EditorFrame
 
-class _EditorFramePlugg(EditorFrame):
+class _EditorFramePlug(EditorFrame):
     def OnClose(self, event):
-        self.OnPluggClose()
+        self.OnPlugClose()
         event.Skip()
 
-class BusController(DEFControler):
+class _DEFControlerPlug(DEFControler):
 
-    ViewClass = _EditorFramePlugg
+    ViewClass = _EditorFramePlug
     
     def __init__(self, buspath):
         filepath = os.path.join(buspath, "gui.def")
         if os.path.isfile(filepath):
             self.OpenXMLFile(filepath)
-        else
+        else:
             self.CreateRootElement()
             self.SetFilePath(filepath)
 
@@ -31,7 +31,10 @@
     "USINT" : "B", "UINT" : "W", "UDINT" : "D", "ULINT" : "L", "REAL" : "D", "LREAL" : "L",
     "STRING" : "B", "BYTE" : "B", "WORD" : "W", "DWORD" : "D", "LWORD" : "L", "WSTRING" : "W"}
 
-class PluginController:
+class RootClass:
+    
+    ChildsType = _DEFControlerPlug
+    
     def BlockTypesFactory(self):
         def generate_svgui_block(generator, block, body, link):
             controller = generator.GetController()
@@ -39,7 +42,7 @@
             type = block.getTypeName()
             block_infos = GetBlockType(type)
             bus_id, name = [word for word in name.split("_") if word != ""]
-            block_id = self.PluginBuses[bus_id].GetElementIdFromName(name)
+            block_id = self.PlugChilds[bus_id].GetElementIdFromName(name)
             if block_id == None:
                 raise ValueError, "No corresponding block found"
             if not generator.ComputedBlocks.get(name, False):