Example #1
0
 def __init__(self):
     self._cells = {}
     for name in [n for n in dir(self) if n.startswith('_get_')]:
         getf = getattr(self, name)
         cell_name = name[5:]
         cell = ComputedCell(getf)
         self._cells[cell_name] = cell
Example #2
0
 def unregister_dependant(self, dependant):
     ComputedCell.unregister_dependant(self, dependant)
     if not self.dependants:
         self.empty_callback()
Example #3
0
 def unregister_dependant(self, dependant):
     ComputedCell.unregister_dependant(self, dependant)
     if not self.dependants:
         self.empty_callback()
Example #4
0
 def __init__(self, function, empty_callback=lambda:None):
     ComputedCell.__init__(self, function)
     # Called when there are no more dependants:
     self.empty_callback = empty_callback
Example #5
0
 def __init__(self, function, empty_callback=lambda: None):
     ComputedCell.__init__(self, function)
     # Called when there are no more dependants:
     self.empty_callback = empty_callback