[Gtk-sharp-list] gtk-sharp-list@lists.ximian.com

Marc Eilens marc.eilens@gmx.de
Sat, 8 Mar 2003 00:42:15 +0100


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

it did compile for me all right, too, but the runtime throw then the error.=
=20
But if it works on your machine, I guess you're right that my setup may be=
=20
buggy. I had some minor problems with some paths during configure and make=
=20
but at last it seemed to have been successful.
Do you have any idea, where to look at especially?

But isn't it strange that the example from the go-mono tutorial works witho=
ut=20
problems? (code at the end of this mail)

Concerning the other response I got, proposing to remove the static keyword=
=20
for the event handlers. I just introduced them because I thought it had to=
=20
with instance methods as event handlers.

thanks for your input,
Marc

>The code compiles and runs here fine using mono 0.22, gtk-sharp-0.8 and
>gtk+-2.2.1 (on both RedHat and Debian). Maybe there's a peculiarity in
>your Gtk+ setup?

>>> (source:=20
http://www.go-mono.org/tutorial/html/en/gnome/bindings/gtk-sharp/getstart.h=
tml)
	using Gtk;
	using GtkSharp;
	using System;

	class Hello {

		static void Main()
		{
			Application.Init ();

    			Button btn =3D new Button ("Hello World");
    			btn.Clicked +=3D new EventHandler (hello);

			Window window =3D new Window ("helloworld");
			window.DeleteEvent +=3D new DeleteEventHandler (delete_event);
			window.Add (btn);
			window.ShowAll ();

			Application.Run ();
    		}


		static void delete_event (object obj, DeleteEventArgs args)
		{
			    Application.Quit ();
		}

		static void hello (object obj, EventArgs args)
		{
			Console.WriteLine("Hello World");
			Application.Quit ();
		}
	}
<<<
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+aS5cPyFrQq7n9YkRAmQeAJ9vthK5FOcvgQ93aouEtQtSm9G1IACfektu
jzgoV9hbcI9Niz4Huy8vlro=3D
=3DKJnH
=2D----END PGP SIGNATURE-----