def addConnection( self, cls = None ):
        """
        Creates a new connection instance in the scene.  If the optional cls \
        parameter is not supplied, then the default connection class will \
        be used when creating the connection.
        
        :param      cls     subclass of <XNodeConnection>
        
        :return     <XNodeConnection> || None
        """
        # make sure we have a valid class
        if ( not cls ):
            cls = self.defaultConnectionClass()
        if ( not cls ):
            return None
        
        # create the new connection
        connection = cls(self)
        connection.setLayer(self.currentLayer())
        self.addItem(connection)
        return connection