0.1.5-2
------- Using wx.GetDefaultPyEncoding/wx.SetDefaultPyEncoding for changing active encoding. Fixed pasting siblings (Ctrl key pressed while pasting). Dealed with ascii build (Python does not recognize 'ascii' as valid encoding). If encoding is not specified it is not written in XRC. Will add more customization in the future. Changed to use SimpleTool instead or Toggle tool (does not work on Win32). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,12 +47,16 @@ class xxxParam(xxxNode):
|
||||
self.textNode.data = value
|
||||
else:
|
||||
def value(self):
|
||||
return self.textNode.data.encode(g.currentEncoding)
|
||||
try:
|
||||
return self.textNode.data.encode(g.currentEncoding)
|
||||
except LookupError:
|
||||
return self.textNode.data.encode()
|
||||
def update(self, value):
|
||||
try: # handle exception if encoding is wrong
|
||||
self.textNode.data = unicode(value, g.currentEncoding)
|
||||
except UnicodeDecodeError:
|
||||
wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
|
||||
self.textNode.data = unicode(value)
|
||||
#wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
|
||||
|
||||
# Integer parameter
|
||||
class xxxParamInt(xxxParam):
|
||||
|
Reference in New Issue
Block a user