(self, parent)
return self
Inserts this component in the component tree as a child
        of the given *parent* node.

        :param parent: the parent component after registration has completed.
        :type parent: :class:`~.manager.Manager`

        This method fires a :class:`~.events.Registered` event to inform
        other components in the tree about the new member.
Inserts this component in the component tree as a child
        of the given *parent* node.
Inserts this component in the component tree as a child of the given * parent * node .
def register(self, parent):
        """
        Inserts this component in the component tree as a child
        of the given *parent* node.

        :param parent: the parent component after registration has completed.
        :type parent: :class:`~.manager.Manager`

        This method fires a :class:`~.events.Registered` event to inform
        other components in the tree about the new member.
        """

        self.parent = parent
        self.root = parent.root

        # Make sure that structure is consistent before firing event
        # because event may be handled in a concurrent thread.
        if parent is not self:
            parent.registerChild(self)
            self._updateRoot(parent.root)
            self.fire(registered(self, self.parent))
        else:
            self._updateRoot(parent.root)

        return self
def register ( self , parent ) : self . parent = parent self . root = parent . root # Make sure that structure is consistent before firing event # because event may be handled in a concurrent thread. if parent is not self : parent . registerChild ( self ) self . _updateRoot ( parent . root ) self . fire ( registered ( self , self . parent ) ) else : self . _updateRoot ( parent . root ) return self