All pastes #592724 Raw Edit

Stuff

public text v1 · immutable
#592724 ·published 2007-06-27 22:03 UTC
rendered paste body
/*

COMPILE LIKE SO:

        mcs -pkg:gtk-sharp TEST3.CS


RUN LIKE SO:

        mono TEST3.exe


GET THIS CRASH DUMP:

Stacktrace:

  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x00007>
  at Test3..ctor (string[]) <0x000b3>
  at Test3.Main (string[]) <0x00019>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object

,intptr,intptr,intptr) <0xffffffff>

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

*/


using System;
using Gtk;


public class Test3 {
        public static void Main(string[] args) {
                new Test3(args);
        }

        public Test3 (string[] args) {
                Application.Init();

                Window win = new Window("test case");

                Button b = new Button("close");
                b.Clicked += on_clicked;

                win.Add(b);
                win.ShowAll();

                Application.Run();
        }

        public void on_clicked (object o, EventArgs e) {
                Application.Quit();
        }


}