def set_data_source(self, lst): dispose(self) self.clear() for item in lst: self.append((item, )) if interfaces.IBindingList.providedBy(lst): self._ibinding_list = lst lst.added.connect(self.on_add) lst.removed.connect(self.on_remove) lst.changed.connect(self.on_changed)
def __dispose__(self): if self._ibinding_list is not None: dispose(self._ibinding_list) self._ibinding_list = None