# File tk/lib/tk/menubar.rb, line 96 def initialize(parent = nil, spec = nil, options = {}) if parent.kind_of? Hash options = parent parent = nil spec = (options.has_key?('spec'))? options.delete('spec'): nil end _symbolkey2str(options) menuspec_opt = {} TkMenuSpec::MENUSPEC_OPTKEYS.each{|key| menuspec_opt[key] = options.delete(key) if options.has_key?(key) } super(parent, options) @menus = [] spec.each{|info| add_menu(info, menuspec_opt)} if spec options.each{|key, value| configure(key, value)} if options end