[Mono-devel-list] Error in MessageDialog
Kaoe Coito
kaoe at fatorweb.com.br
Tue Jul 8 18:24:20 EDT 2003
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;
}
}
}
More information about the Mono-devel-list
mailing list