# HG changeset patch # User Andrey Skvortsov # Date 1550128770 -10800 # Node ID 4f78f0e201d98c46c39fb1a3e907b910ab005b64 # Parent 9c5f835b031e537d5a762900449973f64a30f977 Additional fix for rewrite ForceVariableDialog commit (9076249f) fix following backtrace: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 16765, in lambda event: event.callable(*event.args, **event.kw) ) File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 232, in HandleButton button.ProcessCallback() File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/GraphButton.py", line 156, in ProcessCallback self.Callback() File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 350, in OnForceButton self.ForceValue(self.ItemsDict.values()[0]) File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 428, in ForceValue dialog.GetValue()) File "/home/developer/WorkData/PLC/beremiz/beremiz/dialogs/ForceVariableDialog.py", line 232, in GetValue return GetTypeValue[self.IEC_Type](wx.TextEntryDialog.GetValue(self)) TypeError: unbound method GetValue() must be called with TextEntryDialog instance as first argument (got ForceVariableDialog instance instead) diff -r 9c5f835b031e -r 4f78f0e201d9 dialogs/ForceVariableDialog.py --- a/dialogs/ForceVariableDialog.py Thu Feb 14 10:02:58 2019 +0300 +++ b/dialogs/ForceVariableDialog.py Thu Feb 14 10:19:30 2019 +0300 @@ -228,4 +228,7 @@ event.Skip() def GetValue(self): - return GetTypeValue[self.IEC_Type](wx.TextEntryDialog.GetValue(self)) + """ + Return new enforce value of particular type + """ + return GetTypeValue[self.IEC_Type](self.ValueTextCtrl.GetValue())