Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def PythonCard-0.8.1::component::Scriptable::_findHandler (   self,
  name 
) [private]

Look for a EventHandlers that matches 'name' in our 
list of EventHandlers.

Definition at line 78 of file component.py.

00078                                    :
        """
        Look for a EventHandlers that matches 'name' in our 
        list of EventHandlers.
        """
        handler = self._handlers.get( name, None )
        
        if handler is None :      
            # Change the handler name to target this Scriptable object
            # and look in our list of EventHandlers.
    
            words = name.split('_')
            s = words[ 0 ] + '_' + self.getName() + '_' + words[ len( words ) - 1 ]
            h = self._handlers.get( s, None )
            if h is not None :
                return ( h )
            else:
                # search for Background and Stack handlers like
                # on_mouseClick, on_initialize
                s = words[ 0 ] + '_' + words[ len( words ) - 1 ]
                return self._handlers.get( s, None )
        
        return handler
        
    def execute( self, name, event ) :


Generated by  Doxygen 1.6.0   Back to index