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): |