In Files

  • tk/lib/tk/dialog.rb

Parent

Class/Module Index [+]

Quicksearch

TkDialogObj

Constants

TkCommandNames

Public Class Methods

show(*args) click to toggle source
 
               # File tk/lib/tk/dialog.rb, line 13
def self.show(*args)
  dlog = self.new(*args)
  dlog.show
  dlog
end
            

Public Instance Methods

name() click to toggle source
 
               # File tk/lib/tk/dialog.rb, line 202
def name
  (@val)? @buttons[@val]: nil
end
            
show() click to toggle source
 
               # File tk/lib/tk/dialog.rb, line 166
def show
  # if @command.kind_of?(Proc)
  if TkComm._callback_entry?(@command)
    @command.call(self)
  end

  if @default_button.kind_of?(String)
    default_button = @buttons.index(@default_button)
  else
    default_button = @default_button
  end
  # default_button = '{}' if default_button == nil
  default_button = '' if default_button == nil
  #Tk.ip_eval('eval {global '+@var.id+';'+@config+
  #          'set '+@var.id+' [tk_dialog '+
  #          @path+" "+@title+" {#{@message}} "+@bitmap+" "+
  #          String(default_button)+" "+@buttons.join(' ')+']}')
  Tk.ip_eval(@config)
  # @val = Tk.ip_eval('tk_dialog ' + @path + ' ' + @title +
  #                 ' {' + @message + '} ' + @bitmap + ' ' +
  #                 String(default_button) + ' ' + @buttons.join(' ')).to_i
  # @val = Tk.ip_eval(self.class::TkCommandNames[0] + ' ' + @path + ' ' +
  #                   @title + ' {' + @message + '} ' + @bitmap + ' ' +
  #                   String(default_button) + ' ' + @buttons.join(' ')).to_i
  @val = Tk.ip_eval(array2tk_list([
                                    self.class::TkCommandNames[0],
                                    @path, @title, @message, @bitmap,
                                    String(default_button)
                                  ].concat(@buttons))).to_i
end
            
value() click to toggle source
 
               # File tk/lib/tk/dialog.rb, line 197
def value
  # @var.value.to_i
  @val
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.