[Gtk-sharp-list] Autoconnect problem

Calvin Gaisford cgaisford@novell.com
Fri, 24 Oct 2003 15:51:03 -0600


I'm seeing a problem using Autoconnect when the class I am specifying to 
connect has members that are not derived from Gtk.Widget.  So my class 
looks like this:

public class MainWindow
{
    [Glade.Widget] Window abWin;
    [Glade.Widget] TreeView abTView;
    [Glade.Widget] HPaned abSplit;

    Manager abMgr;

    public MainWindow()
    {
        Glade.XML gxml = new Glade.XML("abook.glade", "abWin", null);
        gxml.Autoconnect(this);
    }

//< removed lines >
}

Everything works great if I have the abMgr class commented out.  When 
that class is there, it appears that the Autoconnect is attempting to 
connect it and I get:

WARNING **: could not load class from token 0x2 in app.exe

Unhandled Exception:  System.NullReferenceException: A null value was 
found where an object instance was required

I can get around the problem by not using Autoconnect and manually 
connecting everything up... pain!  I hope someone has seen this and has 
some advice.

Thanks!

-Calvin