#NEWLINE# def add_widget( self , action_item , index = 0 ) : #NEWLINE# #INDENT# if ( action_item is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if isinstance ( action_item , ActionSeparator ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( not isinstance ( index , ActionItem ) ) : #NEWLINE# #INDENT# raise ActionBarException ( 'ActionView only accepts ActionItem (got {!r}' . format ( action_item ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( index == 0 ) : #NEWLINE# #INDENT# index = len ( self . _list_overflow_items ) #NEWLINE# #UNINDENT# self . _list_overflow_items . insert ( index , action_item )