[Java-gnome-developer] Re: Use of destroy()
Brought to you by:
afcowie
From: Laurent M. <la...@ao...> - 2004-10-28 11:32:48
|
It does not crash the JVM in that case (out of luck), but produces a critical GTK error message: (java-gnome:1903): Gtk-CRITICAL **: file gtkcontainer.c: line 1285 (gtk_container_foreach): assertion `GTK_IS_CONTAINER (container)' failed Remove the destroy() and all is fine. I must admit it is probably not very smart to destroy the source of an event when handling the event, but didn't know how to destroy the gtk object in an other manner. And it was not clear to me that gtk would do that itself. Jeffrey> -Jeff >> -----Original Message----- From: >> jav...@li... >> [mailto:jav...@li...]On >> Behalf Of Laurent Martelli Sent: Wednesday, October 27, 2004 8:54 >> AM To: jav...@li... Subject: >> [Java-gnome-developer] Use of destroy() >> >> >> Hi, >> >> I've spent a few hours tracking down a bug in my application. It >> crashed the JVM when I used escape to close a dialog. It turned >> out I had a DialogListener which called destroy() on the >> dialog. It was really a bad idea because gtk still had references >> on this dialog. >> >> So I'm wondering if it's a good idea to have that destroy() >> method in the java API. It does not seem to be used internally by >> java-gnome and can only give opportunities to the java developper >> to crash the JVM. >> >> -- Laurent Martelli la...@ao... Java Aspect Components >> http://www.aopsys.com/ http://jac.objectweb.org >> >> >> >> ------------------------------------------------------- This >> SF.Net email is sponsored by: Sybase ASE Linux Express Edition - >> download now for FREE LinuxWorld Reader's Choice Award Winner for >> best database on Linux. >> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click >> _______________________________________________ >> java-gnome-developer mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/java-gnome-developer >> Jeffrey> NOTE: THIS IS A CONFIDENTIAL COMMUNICATION. This Jeffrey> transmission is intended only for the use of the Jeffrey> individuals or entity to which it is addressed. If you are Jeffrey> not the intended recipient, or the person responsible for Jeffrey> delivering the message to the intended recipient, please Jeffrey> return or delete it immediately. Although this e-mail and Jeffrey> any attachments are believed to be free of any virus or Jeffrey> other defect, it is the responsibility of the recipient to Jeffrey> ensure that it is virus free and no responsibility is Jeffrey> accepted by us for any loss or damage arising in any way Jeffrey> from its unauthorized modification or use. -- Laurent Martelli la...@ao... Java Aspect Components http://www.aopsys.com/ http://jac.objectweb.org |