#NEWLINE# def menuAddUnitDisplay( self ) : #NEWLINE# #INDENT# if self . menu : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# rolesMenu = Menu ( self . viewFrame , tearoff = 0 ) #NEWLINE# self . menu . add_cascade ( label = _ ( 'Units' ) , menu = rolesMenu , underline = 0 ) #NEWLINE# rolesMenu . add_command ( label = _ ( 'Unit ID' ) , underline = 0 , command = ( lambda : self . setUnitDisplay ( unitDisplayID = True ) ) ) #NEWLINE# rolesMenu . add_command ( label = _ ( 'Measures' ) , underline = 0 , command = ( lambda : self . setUnitDisplay ( unitDisplayID = False ) ) ) #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# self . modelXbrl . info ( 'arelle:internalException' , _ ( 'Exception creating context unit menu in %(title)s: %(error)s' ) , modelObject = self . modelXbrl . modelDocument , title = self . tabTitle , error = str ( ex ) ) #NEWLINE# self . menu = None