/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2700 by dpinte, Mon Sep 18 14:27:02 2006 UTC revision 2718 by dpinte, Fri Jan 5 23:43:49 2007 UTC
# Line 71  class DataTable(grid.PyGridTableBase): Line 71  class DataTable(grid.PyGridTableBase):
71      # Renderer understands the type too,) not just strings as in the      # Renderer understands the type too,) not just strings as in the
72      # C++ version.      # C++ version.
73      def GetValue(self, row, col):      def GetValue(self, row, col):
74          record = self.table.ReadRowAsDict(row, row_is_ordinal = 1)          try:
75                record = self.table.ReadRowAsDict(row, row_is_ordinal = 1)
76            except UnicodeError:
77                record = dict()
78                for (key, val) in self.table.ReadRowAsDict(row, \
79                                  row_is_ordinal = 1).items():
80                    if isinstance(val, str):
81                        record[key] = val.decode('iso-8859-1')
82                    else:
83                        record[key] = val
84          return record[self.columns[col][0]]          return record[self.columns[col][0]]
85    
86      def SetValue(self, row, col, value):      def SetValue(self, row, col, value):

Legend:
Removed from v.2700  
changed lines
  Added in v.2718

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26