Re: hide() show() make my program ends



cyril ponsan wrote:

I just tried this :

   Gtk::MessageDialog dialog2(NULL, "\nUne erreur est survenue.");

and i received this on the terminal :

glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: attempt to create string with null pointer

aborting...


sigh ...

_________________________________________________________________
Ne cherchez plus, trouvez ! Avec le nouveau MSN Search. http://search.msn.fr/

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Ok Cyril,

My little "pass the Gtk::MessageDialog constructor a NULL pointer for parent window" idea was bad all around: The reason you got the NULL string exception is that there are a couple of overloaded constructors for MessageDialog and using NULL as the first parameter called the one that was expecting a Glib::ustring as its first parameter and a boolean variable as the second. Hence the exception. However, when I created a Gtk::Window pointer and set that pointer equal to NULL and passed it to the constructor this way:

Gtk::Window *dummy = NULL
Gtk::MessageDialog dialog2(*dummy,"Test string");

The program still seg faults... so I'm as big a dummy as my pointer.

There does not appear to be a way to do this trick (Gtk::MessageDialog visible, parent window invisible) so far as I can see. If I iconify() the parent window before calling the dialog2.run() function, both windows end up iconified... so I'm stuck just like you.

Sorry,

Bob Caryl



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