ProjectController.py
changeset 1548 3ebc08f75fef
parent 1524 70fc5688741e
child 1551 131610a94da0
equal deleted inserted replaced
1547:33e03a4b3075 1548:3ebc08f75fef
  1117                 plc_file = self._getIECcodepath()
  1117                 plc_file = self._getIECcodepath()
  1118 
  1118 
  1119                 self._IECCodeView = IECCodeViewer(self.AppFrame.TabsOpened, "", self.AppFrame, None, instancepath=name)
  1119                 self._IECCodeView = IECCodeViewer(self.AppFrame.TabsOpened, "", self.AppFrame, None, instancepath=name)
  1120                 self._IECCodeView.SetTextSyntax("ALL")
  1120                 self._IECCodeView.SetTextSyntax("ALL")
  1121                 self._IECCodeView.SetKeywords(IEC_KEYWORDS)
  1121                 self._IECCodeView.SetKeywords(IEC_KEYWORDS)
       
  1122                 self._IECCodeView.Editor.SetReadOnly(True)                
  1122                 try:
  1123                 try:
  1123                     text = file(plc_file).read()
  1124                     text = file(plc_file).read()
  1124                 except:
  1125                 except:
  1125                     text = '(* No IEC code have been generated at that time ! *)'
  1126                     text = '(* No IEC code have been generated at that time ! *)'
  1126                 self._IECCodeView.SetText(text = text)
  1127                 self._IECCodeView.SetText(text = text)