require 'rubygems'
require 'wx'

class MyApp < Wx::App
  private

  def on_init
    MyDialog.new.show_modal
    return false
  end
end

class MyDialog < Wx::Dialog
  private

  def initialize
    super(nil, -1, 'Calculator')
		button = Wx::Button.new(self, -1, 'button')
		evt_button(button) do
			MyDialog2.new.show_modal
		end
  end
end

class MyDialog2 < Wx::Dialog
  private

  def initialize
    super(nil, -1, 'Calculator2')
		button = Wx::Button.new(self, -1, 'button2')
  end
end


MyApp.new.main_loop