[Mono-list] GTK# problem
chris at jib.co.za
chris at jib.co.za
Sat Sep 23 11:18:55 EDT 2006
Hi all,
I have a problem with an gtk# app. As soon as I define a signal, at this
stage it is <signal name="delete_event" handler="on_mainGUI_delete_event"
last_modification_time="Sat, 23 Sep 2006 14:53:03 GMT"/>, in the glade.xml
file, the following Exception is raised:
Object reference not set to an instance of an object.
ConnectFunc()
Autoconnect()
Autoconnect()
.ctor()
Main()
My code looks like this:
---
using Gtk;
using Glade;
using System;
namespace Sharp
{
/// <summary>
/// Description of MainWindow.
/// </summary>
public class MainWindow
{
public MainWindow()
{
Glade.XML gxml = new Glade.XML(null, "Sharp.glade.xml", "mainGUI", null);
gxml.Autoconnect(this);
}
[STAThread]
public static void Main(string[] arg)
{
Application.Init();
new MainWindow();
Application.Run();
}
void on_mainGUI_delete_event(object o, DeleteEventArgs args)
{
Application.Quit();
args.RetVal = true;
}
}
}
---
All ideas appreciated.
Chris
More information about the Mono-list
mailing list