From: David Espada Date: 2004-06-24T20:43:13+09:00 Subject: Re: [ruby-gnome2] segfault with Gtk::ListStore.reorder El jueves 24 de junio, Joao Pedrosa escribi�: >> I use ruby 1.8.1 from Debian Linux Sid (unstable). > > Good. At least you aren't on Windows. :-) Of course ;) > If you could supply a short example that demonstrates the problem, > it would be cool. Here you have example: -----------------8<----------------------------------- #!/usr/bin/ruby require 'glib2' require 'gtk2' def reorder @model.reorder([0,1,2]) end Gtk::init ventana = Gtk::Window.new ventana.set_title("Problem with ruby-gnome2") ventana.signal_connect('delete_event') {exit} vbox = Gtk::VBox::new(true, 10) boton = Gtk::Button.new('Reorder', true) boton.signal_connect('clicked') do reorder end @model = Gtk::ListStore.new(String) @tabla = Gtk::TreeView.new(@model) @tabla.rules_hint = true render = Gtk::CellRendererText.new col = Gtk::TreeViewColumn.new('Title', render, {'text' => 0}) @tabla.append_column(col) a = ['Hello', 'Bye', 'See you'] a.each do |t| l = @model.append l.set_value(0, t) end vbox.pack_start(@tabla, true, true, 0) vbox.pack_start(boton, true, true, 0) ventana.add(vbox) ventana.show_all Gtk.main ------------------------8<-------------------------------- You only have to press button repeatedly until program segs fault :( Greets. David