[Gtk-sharp-list] Strange bug
Ian Parish
iparish@novell.com
Thu, 03 Mar 2005 12:00:33 -0700
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=__Part92B1FAC1.1__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
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
>>><fmoraes@nc.rr.com> 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 - Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
--=__Part92B1FAC1.1__=
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style type=3D"text/css">
<!--
body { font-variant: normal; margin-bottom: 1px; margin-top: 4px; =
margin-left: 4px; line-height: normal; margin-right: 4px }
-->
</style>
=20
</head>
<body style=3D"margin-bottom: 1px; margin-top: 4px; margin-left: 4px; =
margin-right: 4px">
<div>
<DIV> 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. &nbs=
p;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 newDialog3XM=
L.Autoconnet() call is made.
</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Glade.XML gxml = new Glade.XML (null, "nal.glad=
e", "Nal", null);
</DIV>
<DIV> gxml.Autoc=
onnect (this);
</DIV>
<DIV> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
</DIV>
<DIV> iconlist1 =
= (Gnome.IconList)gxml.GetWidget("iconlist1")=
; &nb=
sp; =
&nb=
sp; =
&nb=
sp; =
</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>newDialog3XML = new Glade.XML (null, "test.glad=
e", "dialog3", null);
</DIV>
<DIV>// This call to autoconnet() cause iconlist1 to =
be set to null
</DIV>
<DIV> &nbs=
p; &=
nbsp; newDialog3XML.Autoconnect =
(this);
</DIV>
<DIV> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
</DIV>
<DIV> 
</DIV>
</div>
<div>
<DIV> Ian
</DIV>
</div>
<DIV> <br>
<br>
>>><fmoraes@nc.rr.com> 03/02/05 9:53 pm >>><b=
r>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:<br><br>Unha=
ndled Exception: System.NullReferenceException: Object reference not set =
to<br>an instance of an object.<br>  at Gtk.ListStore.gtk_list_st=
ore_append(IntPtr raw, TreeIter& iter)<br>  at =
Gtk.ListStore.Append()<br><br>Any ideas? This is with GTK# =
1.92.<br><br>Francisco<br><br><br>Gtk-sharp-list maillist  - =
; Gtk-sharp-list@lists.ximian.com<br>http://lists.ximian.com/mailman/l=
istinfo/gtk-sharp-list<br> </DIV>
</body>
</html>
--=__Part92B1FAC1.1__=--