[Gtk-sharp-list] Strange bug
Rafael Teixeira <firstname.lastname@example.org>
Thu, 3 Mar 2005 16:33:25 -0300
Well why are you reutilizing "this" in the autoconnects?
You should have a diferent class for each glade window you are going to use...
That is good OO practice for a start [correctly dividing
responsabilities among objects], and is the basic assumption behind
glade#, so you need to stick to it.
On Thu, 03 Mar 2005 12:00:33 -0700, Ian Parish <email@example.com> wrote:
> 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
> 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);
> >>><firstname.lastname@example.org> 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
> 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.
> Gtk-sharp-list maillist - Gtkemail@example.com
Rafael "Monoman" Teixeira
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.