--- a/SFCViewer.py Mon Sep 10 16:12:29 2007 +0200
+++ b/SFCViewer.py Mon Sep 10 18:16:07 2007 +0200
@@ -369,7 +369,7 @@
#-------------------------------------------------------------------------------
def AddInitialStep(self, pos):
- dialog = StepNameDialog(self.Parent, "Add a new initial step", "Please enter step name", "", wx.OK|wx.CANCEL)
+ 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.GetCurrentElementEditingInterfaceVars())
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)])
@@ -391,7 +391,7 @@
def AddStep(self):
if self.SelectedElement in self.Wires or isinstance(self.SelectedElement, SFC_Step):
- dialog = StepNameDialog(self.Parent, "Add a new step", "Please enter step name", "", wx.OK|wx.CANCEL)
+ 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.GetCurrentElementEditingInterfaceVars())
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)])
@@ -447,7 +447,7 @@
if isinstance(self.SelectedElement, SFC_Step):
connectors = self.SelectedElement.GetConnectors()
if not connectors["action"]:
- dialog = ActionBlockDialog(self.Parent)
+ dialog = ActionBlockDialog(self.ParentWindow)
dialog.SetQualifierList(self.Controler.GetQualifierTypes())
dialog.SetActionList(self.Controler.GetCurrentElementEditingActions())
dialog.SetVariableList(self.Controler.GetCurrentElementEditingInterfaceVars())
@@ -474,7 +474,7 @@
def AddDivergence(self):
if self.SelectedElement in self.Wires or isinstance(self.SelectedElement, Graphic_Group) or isinstance(self.SelectedElement, SFC_Step):
- dialog = DivergenceCreateDialog(self.Parent)
+ dialog = DivergenceCreateDialog(self.ParentWindow)
if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetValues()
if value["type"] == SELECTION_DIVERGENCE:
@@ -702,7 +702,7 @@
for block in self.Blocks:
if isinstance(block, SFC_Step):
choices.append(block.GetName())
- dialog = wx.SingleChoiceDialog(self.Parent, "Add a new jump", "Please choose a target", choices, wx.OK|wx.CANCEL)
+ dialog = wx.SingleChoiceDialog(self.ParentWindow, "Add a new jump", "Please choose a target", choices, wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetStringSelection()
self.SelectedElement.AddOutput()
@@ -730,7 +730,7 @@
if self.GetDrawingMode() == FREEDRAWING_MODE:
Viewer.EditStepContent(self, step)
else:
- dialog = StepNameDialog(self.Parent, "Edit step name", "Please enter step name", step.GetName(), wx.OK|wx.CANCEL)
+ 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.GetCurrentElementEditingInterfaceVars())
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step) and block.GetName() != step.GetName()])