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

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

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

revision 1000 by frank, Thu May 22 19:40:06 2003 UTC revision 1007 by bh, Thu May 22 20:08:02 2003 UTC
# Line 55  class JoinDialog(wxDialog): Line 55  class JoinDialog(wxDialog):
55          self.choice_right_table.Append('Select ...', None)          self.choice_right_table.Append('Select ...', None)
56                    
57          for t in session.Tables():          for t in session.Tables():
58              self.choice_left_table.Append(t.transient_table().tablename, t)              self.choice_left_table.Append(t.transient_table().Title(), t)
59              self.choice_right_table.Append(t.transient_table().tablename, t)              self.choice_right_table.Append(t.transient_table().Title(), t)
60    
61          EVT_CHOICE(self, ID_LEFT_TABLE, self.OnLeftTable)          EVT_CHOICE(self, ID_LEFT_TABLE, self.OnLeftTable)
62          EVT_CHOICE(self, ID_RIGHT_TABLE, self.OnRightTable)          EVT_CHOICE(self, ID_RIGHT_TABLE, self.OnRightTable)
# Line 122  class JoinDialog(wxDialog): Line 122  class JoinDialog(wxDialog):
122              joined_table = TransientJoinedTable(self.db, left_table, left_field,              joined_table = TransientJoinedTable(self.db, left_table, left_field,
123                                              right_table, right_field)                                              right_table, right_field)
124          except:          except:
125              exc_type, exc_value, exc_traceback = sys.exc_info()              dlg = wxMessageDialog(None, 'Join failed:\n  %s'%sys.exc_info()[1],
             dlg = wxMessageDialog(None, 'Join failed:\n  %s' % exc_value,  
126                                          'Info',wxOK|wxICON_ERROR)                                          'Info',wxOK|wxICON_ERROR)
127              dlg.ShowModal()              dlg.ShowModal()
128              dlg.Destroy              dlg.Destroy()
129              result = False              result = False
130            
131          if result:          if result:
132              self.session.AddTable(joined_table)              self.session.AddTable(joined_table)
133              name = joined_table.tablename              name = joined_table.tablename

Legend:
Removed from v.1000  
changed lines
  Added in v.1007

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26