Some bugs fixed
authorlbessard
Sun, 09 Dec 2007 17:15:56 +0100
changeset 74 8a726a62fbfc
parent 73 5e1e3d46c0c9
child 75 9ad18a387a96
Some bugs fixed
plugger.py
--- a/plugger.py	Thu Dec 06 18:06:13 2007 +0100
+++ b/plugger.py	Sun Dec 09 17:15:56 2007 +0100
@@ -33,12 +33,12 @@
     def __init__(self, filepath):
         self.FilePath = filepath
         
-    def SetCurrentElementEditingText(self, text):
+    def SetEditedElementText(self, tagname, text):
         file = open(self.FilePath, "w")
         file.write(text)
         file.close()
         
-    def GetCurrentElementEditingText(self):
+    def GetEditedElementText(self, tagname):
         if os.path.isfile(self.FilePath):
             file = open(self.FilePath, "r")
             text = file.read()
@@ -46,6 +46,18 @@
             return text
         return ""
     
+    def GetEditedElementInterfaceVars(self, tagname):
+        return []
+    
+    def GetEditedElementType(self, tagname):
+        return "program"
+    
+    def GetBlockTypes(self, tagname = ""):
+        return []
+    
+    def GetEnumeratedDataValues(self):
+        return []
+    
     def StartBuffering(self):
         pass
 
@@ -901,7 +913,7 @@
     def _showIECcode(self, logger):
         plc_file = self._getIECcodepath()
         new_dialog = wx.Frame(None)
-        ST_viewer = TextViewer(new_dialog, None, None)
+        ST_viewer = TextViewer(new_dialog, "", None, None)
         #ST_viewer.Enable(False)
         ST_viewer.SetKeywords(IEC_KEYWORDS)
         try:
@@ -921,7 +933,7 @@
             os.mkdir(buildpath)
         
         controler = MiniTextControler(self._getIECrawcodepath())
-        ST_viewer = TextViewer(new_dialog, None, controler)
+        ST_viewer = TextViewer(new_dialog, "", None, controler)
         #ST_viewer.Enable(False)
         ST_viewer.SetKeywords(IEC_KEYWORDS)
         ST_viewer.RefreshView()
@@ -971,8 +983,8 @@
          "name" : "Show IEC code",
          "tooltip" : "Show IEC code generated by PLCGenerator",
          "method" : _showIECcode},
-        {"name" : "Edit IEC raw code",
-         "tooltip" : "Show IEC code generated by PLCGenerator",
+        {"name" : "Edit raw IEC code",
+         "tooltip" : "Edit raw IEC code added to code generated by PLCGenerator",
          "method" : _editIECrawcode}
     ]