'Add the child object \'child\'. If it is already present,
it is overwritten by default'

def addChild2(self, child):

    currChild = self.getChild(child.getName())
    if currChild:
        index = self.getIndex(currChild)
        if (index != (-1)):
            self._children[index] = child
            child.setParent(self)
            currChild.setParent(None)
            del currChild
            self.__setChildDict(child)
    else:
        child.setParent(self)
        self._children.append(child)
        self.__setChildDict(child)
