|
I saw this and it was very frustrating. I came to the conclusion that the .Autoconnect() call that is called when any additional dialog/widget is loaded is causing the initial lists/variables to be cleared or set to Null. I wasn't able to find a fix or work around it(that was easy, I could have done all the work autoconnect() does manually) In this sample code Iconlist1 is set and valid until the newDialog3XML.Autoconnet() call is made.
Glade.XML gxml = new Glade.XML (null, "nal.glade", "Nal", null);
gxml.Autoconnect (this);
iconlist1 = (Gnome.IconList)gxml.GetWidget("iconlist1");
newDialog3XML = new Glade.XML (null, "test.glade", "dialog3", null);
// This call to autoconnet() cause iconlist1 to be set to null
newDialog3XML.Autoconnect (this);
Ian
>>><[EMAIL PROTECTED]> 03/02/05 9:53 pm >>> This seems to occur on with my dialog (has a TreeView with a custom ListStore model). It works fine for the first instance of the dialog. After I close and destroy it, I reopen, remove an item from the list and try to append a new one and I get the exception below: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Gtk.ListStore.gtk_list_store_append(IntPtr raw, TreeIter& iter) at Gtk.ListStore.Append() Any ideas? This is with GTK# 1.92. Francisco Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list |
- [Gtk-sharp-list] Strange bug fmoraes
- Re: [Gtk-sharp-list] Strange bug Ian Parish
- Re: [Gtk-sharp-list] Strange bug Rafael Teixeira
- Re: [Gtk-sharp-list] Strange bug Mike Kestner
