[Gtk-sharp-list] Several glade autoconnects?

Christian Rudh chrru169@student.liu.se
08 Mar 2003 17:20:31 +0100


Hi

I have a problem with importing glade-files in my application. It works
fine in the main object, but if I want to create other dialogs (chat
dialogs) from my main object (on a button click) the entire application
freezes and uses 100% CPU. Here is the relevant code from my
application:


ClientCore is the main class of the program, that launches when I start
it. And the glade initialization here works fine:

public ClientCore(string[] args){
	Application.Init();
	
	Glade.XML gxml = new Glade.XML ("client.glade", "window1",null);
	gxml.Autoconnect(this);

	<MY CODE HERE>

	Application.Run();
}

And from one of the buttons defined in window1 I run a procedure that
creates an object, and that object also uses a gtk window defined in
glade:


public class ChatObject{
	[GladeWidget] Window chatWindow;

	public ChatObject(){
		Glade.XML gxml = new Glade.XML("client.glade", "chatWindow", null);
		gxml.Autoconnect(this);
	}
		
	public string Title{
		set{
			//chatWindow.Title = value;
		}
		get{
			//return chatWindow.Title;
		}
	}
}

But whenever an object of this type tries to do the .Autoconnect the
entire application freezes and uses 100% CPU until I kill it. Anyone got
a suggestion of what to do?

-- 
Christian Rudh <chrru169@student.liu.se>