--- a/dialogs/ForceVariableDialog.py Tue Dec 08 17:10:30 2009 +0100
+++ b/dialogs/ForceVariableDialog.py Wed Dec 09 10:19:35 2009 +0100
@@ -45,7 +45,7 @@
getfloat = gen_get_function(float)
getstring = gen_get_function(str)
-GetTypeValue = {"BOOL": lambda x: {"TRUE": True, "FALSE": False}.get(x, None),
+GetTypeValue = {"BOOL": lambda x: {"TRUE": True, "FALSE": False}.get(x.upper(), None),
"SINT": getinteger,
"INT": getinteger,
"DINT": getinteger,
@@ -73,9 +73,9 @@
else:
event(self, function)
- def __init__(self, parent, iec_type):
+ def __init__(self, parent, iec_type, defaultValue=""):
wx.TextEntryDialog.__init__(self, parent, message = _("Forcing Variable Value"),
- caption = _("Please enter value for a \"%s\" variable:"%iec_type), defaultValue = "",
+ caption = _("Please enter value for a \"%s\" variable:"%iec_type), defaultValue = defaultValue,
style = wx.OK|wx.CANCEL|wx.CENTRE, pos = wx.DefaultPosition)
self.IEC_Type = iec_type