Skip to content

Commit

Permalink
renamed Dialog#showOption to show_option
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Nov 4, 2008
1 parent 0181d5b commit be10b09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Some examples:

# options-dialog
options = ["Yes", "No", "Cancel"]
selected_value = Dialog.showOption(options.join(" or ") + "?",
selected_value = Dialog.show_option(options.join(" or ") + "?",
:option_values => options,
:option_type => :yes_no_cancel,
:belongs_to => frame)
Expand Down
2 changes: 1 addition & 1 deletion examples/numberconverter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module Numberconverter
# eventhandler code
panel = frame[:panel]
panel[:button].on_click do
result = Dialog.showOption "Please select:",
result = Dialog.show_option "Please select:",
:option_type => :yes_no,
:option_values => ["HEX", "BINARY"],
:title => "Pick an option!",
Expand Down
4 changes: 2 additions & 2 deletions lib/rswing/components/dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Components

# Dialog-Class.
# Has static methods to create Message-Dialogs.
# (<tt>show()</tt> and <tt>showOptions</tt>).
# (<tt>show()</tt> and <tt>show_option</tt>).
# Can also be used to create custom dialogs by extending from this class.
class Dialog < JDialog
include Window
Expand Down Expand Up @@ -79,7 +79,7 @@ def self.show(message, options = {})
# 4. <tt>:modal => false</tt> (default: <tt>true</tt>)
# 5. <tt>:icon => nil</tt> (default: nil)
# 6. <tt>:belongs_to => parent</tt> Parent-Container for this dialog (default: nil)
def self.showOption(message, options = {})
def self.show_option(message, options = {})
title = options[:title].nil? ? Options.gui_options[:option_default_title] : options[:title]
icon = Options.value_for(options => :icon)

Expand Down

0 comments on commit be10b09

Please sign in to comment.