On Fri, Jul 06, 2001 at 05:33:58PM +0900, ts wrote:
> D>  Question is GC. When I disable it, can open and close edition windows in my
> D>  application without getting errors. If i enable again and continue to open
> D>  and close windows... flash!
> 
>  It's best if you can give a *SMALL* script which reproduce the problem. 

 I have been exploring more deeply. Now I have a script that reproduces
 error. And think I have found where it fails precisely:

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

require 'gtk'
require 'gnome'
include Gnome::I18n

ESPACIO = 10

class Main < Gnome::App
	def initialize
		super('Foo', 'Ruby/Gnome breaking')

		signal_connect('delete_event') do
			salir
		end
		
		signal_connect("destroy") do
			Gtk::main_quit
		end

	# Problem!!!
	# If marked <= is commented, error doesn't raise.
		full_win								# <=
	end											# <=

	private										# <=
	def full_win								# <=
		@box1 = Gtk::VBox.new(false, ESPACIO)
		set_contents(@box1)

		
		#Menů¸
		menu_win = [
			Gnome::UIInfo::item_stock("New", nil, proc {new_win}, Gnome::Stock::MENU_NEW),
			Gnome::UIInfo::separator,
			Gnome::UIInfo::item_stock(N_("Quit"), nil, proc { salir }, Gnome::Stock::MENU_EXIT)
		]
	
		menu_main = [
			Gnome::UIInfo::subtree("_Window", menu_win)
			]

		create_menus(menu_main)
		
		show_all
	end

	def new_win
		win = Gtk::Window.new
		bot = Gtk::Button.new('Click here')
		bot.signal_connect('clicked') do
			salir
		end
		win.add(bot)
		win.show_all
	end

	def salir
		destroy
	end
end

Gtk.idle_add do
	GC.start
end

Main.new

Gtk.main

exit(0)

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

 Greets.

 						David