peng3d/peng.py
def delEventListener(self,event,func):
        """
        Removes the given handler from the given event.
        
        If the event does not exist, a :py:exc:`NameError` is thrown.
        
        If the handler has not been registered previously, also a :py:exc:`NameError` will be thrown.
        """
        if event not in self.eventHandlers:
            raise NameError("No handlers exist for event %s"%event)
        if [func,True] in self.eventHandlers[event]:
            del self.eventHandlers[event][self.eventHandlers[event].index(func)]
        elif [func,False] in self.eventHandler[event]:
            del self.eventHandlers[event][self.eventHandlers[event].index(func)]
        else:
            raise NameError("This handler is not registered for event %s"%event)
        if self.eventHandlers[event] == []:
            del self.eventHandlers[event]
def delEventListener(self,event,func):
        """
        Removes the given handler from the given event.
        
        If the event does not exist, a :py:exc:`NameError` is thrown.
        
        If the handler has not been registered previously, also a :py:exc:`NameError` will be thrown.
        """
        if event not in self.eventHandlers:
            raise NameError("No handlers exist for event %s"%event)
        if [func,True] in self.eventHandlers[event]:
            del self.eventHandlers[event][self.eventHandlers[event].index(func)]
        elif [func,False] in self.eventHandler[event]:
            del self.eventHandlers[event][self.eventHandlers[event].index(func)]
        else:
            raise NameError("This handler is not registered for event %s"%event)
        if self.eventHandlers[event] == []:
            del self.eventHandlers[event]
def delEventListener ( self , event , func ) : if event not in self . eventHandlers : raise NameError ( "No handlers exist for event %s" % event ) if [ func , True ] in self . eventHandlers [ event ] : del self . eventHandlers [ event ] [ self . eventHandlers [ event ] . index ( func ) ] elif [ func , False ] in self . eventHandler [ event ] : del self . eventHandlers [ event ] [ self . eventHandlers [ event ] . index ( func ) ] else : raise NameError ( "This handler is not registered for event %s" % event ) if self . eventHandlers [ event ] == [ ] : del self . eventHandlers [ event ]
Removes the given handler from the given event.
        
        If the event does not exist, a :py:exc:`NameError` is thrown.
        
        If the handler has not been registered previously, also a :py:exc:`NameError` will be thrown.
Removes the given handler from the given event . If the event does not exist a : py : exc : NameError is thrown . If the handler has not been registered previously also a : py : exc : NameError will be thrown .