diff -r f7df265edd54 -r d8425712acef SFCViewer.py --- a/SFCViewer.py Fri Sep 05 18:12:23 2008 +0200 +++ b/SFCViewer.py Fri Sep 05 18:13:18 2008 +0200 @@ -29,8 +29,8 @@ class SFC_Viewer(Viewer): - def __init__(self, parent, tagname, window, controler): - Viewer.__init__(self, parent, tagname, window, controler) + def __init__(self, parent, tagname, window, controler, debug = False, instancepath = ""): + Viewer.__init__(self, parent, tagname, window, controler, debug, instancepath) self.CurrentLanguage = "SFC" def ConnectConnectors(self, start, end): @@ -356,8 +356,8 @@ def AddInitialStep(self, pos): dialog = StepNameDialog(self.ParentWindow, "Add a new initial step", "Please enter step name", "", wx.OK|wx.CANCEL) - dialog.SetPouNames(self.Controler.GetProjectPouNames()) - dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName)) + dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug)) + dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)]) if dialog.ShowModal() == wx.ID_OK: id = self.GetNewId() @@ -378,8 +378,8 @@ def AddStep(self): if self.SelectedElement in self.Wires or isinstance(self.SelectedElement, SFC_Step): dialog = StepNameDialog(self.ParentWindow, "Add a new step", "Please enter step name", "", wx.OK|wx.CANCEL) - dialog.SetPouNames(self.Controler.GetProjectPouNames()) - dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName)) + dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug)) + dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)]) if dialog.ShowModal() == wx.ID_OK: name = dialog.GetValue() @@ -435,8 +435,8 @@ if not connectors["action"]: dialog = ActionBlockDialog(self.ParentWindow) dialog.SetQualifierList(self.Controler.GetQualifierTypes()) - dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName)) - dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName)) + dialog.SetActionList(self.Controler.GetEditedElementActions(self.TagName, self.Debug)) + dialog.SetVariableList(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) if dialog.ShowModal() == wx.ID_OK: actions = dialog.GetValues() self.SelectedElement.AddAction() @@ -718,8 +718,8 @@ Viewer.EditStepContent(self, step) else: dialog = StepNameDialog(self.ParentWindow, "Edit step name", "Please enter step name", step.GetName(), wx.OK|wx.CANCEL) - dialog.SetPouNames(self.Controler.GetProjectPouNames()) - dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName)) + dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug)) + dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)) dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step) and block.GetName() != step.GetName()]) if dialog.ShowModal() == wx.ID_OK: value = dialog.GetValue()