Changeset 1040

Show
Ignore:
Timestamp:
05/04/2005 12:32:23 PM (4 years ago)
Author:
paul
Message:

This makes the grid appear on wx version 2.5.3.2... but
an error is still thrown when you navigate to a record
with a special character, and the special characters
don't display on the grid row.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ui/uiwx/dGrid.py

    r1037 r1040  
    2727except ImportError: 
    2828    _USE_DECIMAL = False 
    29          
     29 
     30# wx versions < 2.6 don't have the GetDefaultPyEncoding function: 
     31try: 
     32    defaultEncoding = wx.GetDefaultPyEncoding() 
     33except AttributeError: 
     34    defaultEncoding = "latin-1" 
    3035         
    3136 
     
    214219                    if isinstance(recordVal, basestring): 
    215220                        if recType is unicode: 
    216                             recordVal = recordVal.encode(wx.GetDefaultPyEncoding()
     221                            recordVal = recordVal.encode(defaultEncoding
    217222                        else: 
    218223                            recordVal = unicode(recordVal, encod) 
     
    514519        self.listEditors = {} 
    515520        # Type of encoding to use with unicode data 
    516         self.defaultEncoding = wx.GetDefaultPyEncoding()       #"latin-1" 
     521        self.defaultEncoding = defaultEncoding 
    517522        # What color should the little sort indicator arrow be? 
    518523        self.sortArrowColor = "Orange"