#NEWLINE# def dispatch_event( self , element , event_type , * args ) : #NEWLINE# #INDENT# for frame in self . _event_stack : #NEWLINE# #INDENT# ruleset = frame . get ( event_type , None ) #NEWLINE# if ruleset : #NEWLINE# #INDENT# handlers = ruleset . get_matching_rules ( element ) #NEWLINE# for handler in handlers : #NEWLINE# #INDENT# ret = handler ( element , * args ) #NEWLINE# if ( ret != EVENT_UNHANDLED ) : #NEWLINE# #INDENT# return True