[wxruby-development] [ wxruby-Bugs-20255 ] Instabilities on Linux - 1.9.7

noreply at rubyforge.org
Tue, 20 May 2008 08:10:04 -0000

Bugs item #20255, was opened at 2008-05-20 08:10
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=20255&group_id=35

Category: Incorrect behavior
Group: None
Status: Open
Resolution: None
Priority: 4
Submitted By: Alex Fenton (brokentoy)
Assigned to: Alex Fenton (brokentoy)
Summary: Instabilities on Linux - 1.9.7

Initial Comment:
Segfaults after opening and closing frames on GTK. See
http://rubyforge.org/pipermail/wxruby-users/2008-May/003916.html


=============
require ''wx''

class ChildFrame < Wx::Frame
  def initialize parent
    super(parent, -1, "Child frame")

    viewMenu = Wx::Menu.new
    viewMenu.append(Wx::ID_CLOSE, "Close\tCtrl-W", "Close this
window")
    evt_menu(Wx::ID_CLOSE) { show false }

    menuBar = Wx::MenuBar.new
    menuBar.append(viewMenu, "&View")
    set_menu_bar menuBar
  end
end

class TestFrame < Wx::Frame
  def initialize
    super(nil, -1, "Test Frame")

    menu = Wx::Menu.new
    menuItem = Wx::MenuItem.new(menu, -1, "Show child")
    menu.append_item menuItem
    evt_menu(menuItem) { ChildFrame.new(self).show }

    menuBar = Wx::MenuBar.new
    menuBar.append(menu, "&View")
    set_menu_bar menuBar
  end
end

class TestApp < Wx::App
  def on_init
    TestFrame.new.show
  end
end

TestApp.new.main_loop

require ''wx''

----------------------------------------------------------------------

You can respond by visiting: