/[ascend]/trunk/pygtk/observer.py
ViewVC logotype

Diff of /trunk/pygtk/observer.py

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

revision 855 by johnpye, Wed Sep 20 14:00:41 2006 UTC revision 856 by johnpye, Thu Sep 21 12:54:43 2006 UTC
# Line 71  class ObserverColumn: Line 71  class ObserverColumn:
71                  cell.set_property('foreground',OBSERVER_NORMAL_COLOR)                  cell.set_property('foreground',OBSERVER_NORMAL_COLOR)
72                  _rawval = _rowobject.values[self.index]                  _rawval = _rowobject.values[self.index]
73              _dataval = _rawval / self.units.getConversion()              _dataval = _rawval / self.units.getConversion()
74          except KeyError:          except IndexError:
75              _dataval = ""              _dataval = ""
76    
77          cell.set_property('text', _dataval)          cell.set_property('text', _dataval)
# Line 93  class ObserverRow: Line 93  class ObserverRow:
93          self.active = False          self.active = False
94          print "TABLE COLS:",table.cols          print "TABLE COLS:",table.cols
95          print "ROW VALUES:",self.values          print "ROW VALUES:",self.values
96          r=0;          _v = []
97          for index,col in table.cols.iteritems():          for col in table.cols.values():
98              print "ROW",r,"; INDEX: ",index,"; COL: ",col              _v.append( col.instance.getRealValue() / col.units.getConversion() )
99              try:          self.values = _v
                 self.values[index] = col.instance.getRealValue()  
             except IndexError,e:  
                 print "Index error: e=",str(e)  
                 self.values[index] = None  
             r=r+1  
100          print "Made static, values:",self.values          print "Made static, values:",self.values
101    
102      def get_values(self,table):      def get_values(self,table):

Legend:
Removed from v.855  
changed lines
  Added in v.856

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22