Re: cant recreate window



On 1/12/07, Micah Carrick <email micahcarrick com> wrote:

 Yucehan Kutlu wrote:
 Hi
 i have an app that uses several windows when i create and close one
window, after that if i want to create this window again, i get error
below

(zebra:4121): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed

(zebra:4121): GLib-GObject-WARNING **: instance with invalid (NULL)
class pointer

(zebra:4121): GLib-GObject-CRITICAL **: g_signal_emit_valist:
assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(zebra:4121): GLib-GObject-CRITICAL **: g_object_notify: assertion
`G_IS_OBJECT (object)' failed

(zebra:4121): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

Any idea how to solve this

Thanks
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


 Let's see your code. Are you trying to show a window that's been destroyed?

 --
- Micah Carrick
 Freelance Developer
 http://www.micahcarrick.com | http://www.gtkforums.com


I solve my problem with hiding windows but i use to use that type of
code previously

void on_showin_destroy                     (GtkObject       *object,
                                       gpointer         user_data)
{
             gtk_main_quit();
}

It gives error when user recreate "showin" window

Then i use that code for hiding;

void on_showin_destroy                     (GtkObject       *object,
                                       gpointer         user_data)
{
        // Get showin's pointer
   GtkWidget * showin = gtk_widget_get_toplevel(GTK_WIDGET(object));

   // Hide the showin window
   gtk_widget_hide(showin);
}

But it doesnt help too and finaly i connect the code to a button like;

void
on_ok1_clicked                         (GtkButton       *button,
                                       gpointer         user_data)
{
        // Get changewin's pointer
   GtkWidget * changewin = gtk_widget_get_toplevel(GTK_WIDGET(button));

   // Hide the changewin window
   gtk_widget_hide(changewin);
}

With this when user recreate the window, (s)he doesnt take any errors
but i wonder how i make it with destroy signal and reason of the error

Thanks alot



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]