[Mono-devel-list] Error in MessageDialog

Daniel Morgan danmorg at comcast.net
Tue Jul 8 18:42:48 EDT 2003


I never could get Gtk MessageDialog to work for me either.


-----Original Message-----
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Kaoe Coito
Sent: Tuesday, July 08, 2003 6:24 PM
To: mono-devel-list at lists.ximian.com
Subject: [Mono-devel-list] Error in MessageDialog


Hello
When I click in any button occurs this Exception!

Somebody knows as to help me?

Thanks.

Error:

(<unknown>:3346): GLib-GObject-CRITICAL **: file gobject.c: line 1307
(g_object_unref): assertion `G_IS_OBJECT (object)' failed

Unhandled Exception: System.NullReferenceException: A null value was
found where an object instance was required
in (unmanaged) 06 Gtk.Widget:gtk_widget_destroy (intptr)
in <0x00004> 06 Gtk.Widget:gtk_widget_destroy (intptr)
in <0x0001c> 00 Gtk.Widget:Destroy ()
in [0x00006] (at /root/Projetos/Saturno/formUsuarios.cs:64) 00
Saturno.formUsuarios:Dispose ()
in [0x00001] (at /root/Projetos/Saturno/formUsuarios.cs:103) 00
Saturno.formUsuarios:on_btFechar_clicked (object,System.EventArgs)
in <0x0005a> 01 System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in <0x0013c> 00 GtkSharp.voidObjectSignal:voidObjectCallback
(intptr,int)
in <0x00030> 05 GtkSharp.voidObjectSignal:voidObjectCallback
(intptr,int)
in (unmanaged) 06 Gtk.Application:gtk_main ()
in <0x00004> 06 Gtk.Application:gtk_main ()
in <0x00007> 00 Gtk.Application:Run ()
in [0x00016] (at /root/Projetos/Saturno/frPrincipal.cs:67) 00
Saturno.frPrincipal:Main ()

----------------------------------------------------------------------------
-
Code:

namespace Saturno
{

using Gtk;
using GtkSharp;
using System;

public sealed class Dlg
{

        public static int Show(Window main, MessageType type,ButtonsType
bt, String texto)
        {

                MessageDialog dlg = new MessageDialog(main,
DialogFlags.Modal | DialogFlags.DestroyWithParent, type, bt,texto);
                int ret = dlg.Run();
                dlg.Destroy();

                return ret;
        }
}

}


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list