hopefully this will fix some encoding problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e98e706227
commit
e484fddf08
@ -630,7 +630,7 @@ class ParamContent(PPanel):
|
||||
def GetValue(self):
|
||||
if self.textModified: # text has newer value
|
||||
try:
|
||||
return eval(self.text.GetValue())
|
||||
return self.text.GetValue().split('|')
|
||||
except SyntaxError:
|
||||
wx.LogError('Syntax error in parameter value: ' + self.GetName())
|
||||
return []
|
||||
@ -639,15 +639,12 @@ class ParamContent(PPanel):
|
||||
self.freeze = True
|
||||
if not value: value = []
|
||||
self.value = value
|
||||
self.text.SetValue(str(value)) # update text ctrl
|
||||
repr_ = reduce(lambda a,b: '%s|%s' % (a,b), value)
|
||||
self.text.SetValue(repr_) # update text ctrl
|
||||
self.freeze = False
|
||||
def OnButtonEdit(self, evt):
|
||||
if self.textModified: # text has newer value
|
||||
try:
|
||||
self.value = eval(self.text.GetValue())
|
||||
except SyntaxError:
|
||||
wx.LogError('Syntax error in parameter value: ' + self.GetName())
|
||||
self.value = []
|
||||
self.value = self.GetValue()
|
||||
dlg = ContentDialog(self, self.value)
|
||||
if dlg.ShowModal() == wx.ID_OK:
|
||||
value = []
|
||||
@ -664,11 +661,7 @@ class ParamContentCheckList(ParamContent):
|
||||
ParamContent.__init__(self, parent, name)
|
||||
def OnButtonEdit(self, evt):
|
||||
if self.textModified: # text has newer value
|
||||
try:
|
||||
self.value = eval(self.text.GetValue())
|
||||
except SyntaxError:
|
||||
wx.LogError('Syntax error in parameter value: ' + self.GetName())
|
||||
self.value = []
|
||||
self.value = self.GetValue()
|
||||
dlg = ContentCheckListDialog(self, self.value)
|
||||
if dlg.ShowModal() == wx.ID_OK:
|
||||
value = []
|
||||
|
@ -90,7 +90,7 @@ class xxxParamContent(xxxNode):
|
||||
text = n.childNodes[0] # first child must be text node
|
||||
assert text.nodeType == minidom.Node.TEXT_NODE
|
||||
l.append(text)
|
||||
data.append(str(text.data))
|
||||
data.append(text.data)
|
||||
else: # remove other
|
||||
node.removeChild(n)
|
||||
n.unlink()
|
||||
|
Loading…
Reference in New Issue
Block a user