def componentDetachedFromContainer(self, event):
        self._test._detachCounter += 1
        self._test._detachedComponent = event.getDetachedComponent()
        self._test._detachedTarget = event.getContainer()

        # Search for component in container (should NOT be found)
        it = self._test._detachedTarget.getComponentIterator()
        while True:
            try:
                if it.next() == self._test._detachedComponent:
                    self._test._foundInContainer = True
                    break
            except __HOLE__:
                break

        # Get layout specific variables
        if isinstance(self._test._detachedTarget, AbstractOrderedLayout):
            self._test._indexOfComponent = \
                    self._test._detachedTarget.getComponentIndex(
                            self._test._detachedComponent)
        elif isinstance(self._test._detachedTarget, GridLayout):
            self._test._componentArea = \
                    self._test._detachedTarget.getComponentArea(
                            self._test._detachedComponent)
        elif isinstance(self._test._detachedTarget, AbsoluteLayout):
            self._test._componentPosition = \
                    self._test._detachedTarget.getPosition(
                            self._test._detachedComponent)
dataset/ETHPy150Open rwl/muntjac/muntjac/test/server/components/component_attach_detach_listener_test.py/MyDetachListener.componentDetachedFromContainer