In Files

  • tk/lib/tk/menu.rb

Methods

Class/Module Index [+]

Quicksearch

Tk::SystemMenu

Public Class Methods

new(parent, keys=nil) click to toggle source
 
               # File tk/lib/tk/menu.rb, line 480
def initialize(parent, keys=nil)
  if parent.kind_of? Hash
    keys = _symbolkey2str(parent)
    parent = keys.delete('parent')
  end
  #unless parent.kind_of? TkMenu
  #  fail ArgumentError, "parent must be a TkMenu object"
  #end
  # @path = Kernel.format("%s.%s", parent.path, self.class::SYSMENU_NAME)
  @path = parent.path + '.' + self.class::SYSMENU_NAME
  #TkComm::Tk_WINDOWS[@path] = self
  TkCore::INTERP.tk_windows[@path] = self
  if self.method(:create_self).arity == 0
    p 'create_self has no arg' if $DEBUG
    create_self
    configure(keys) if keys
  else
    p 'create_self has an arg' if $DEBUG
    create_self(keys)
  end
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.