Exemplo n.º 1
0
    def _update_children(self):
        if self._in_update_children: raise AssertionError
        self._in_update_children = True
        self._children = self._get_children_from_model()
        self._state = map(compose(self._get_state_from_model, second), self._children)
        self.notify_children()
        for idx, value in enumerate(self._state):
            self.notify_state(idx, value)

        self._in_update_children = False
    def _update_children(self):
        raise not self._in_update_children or AssertionError
        self._in_update_children = True
        self._children = self._get_children_from_model()
        self._state = map(compose(self._get_state_from_model, second), self._children)
        self.notify_children()
        for idx, value in enumerate(self._state):
            self.notify_state(idx, value)

        self._in_update_children = False