mail-archives/gtk-sharp-list/2004-August/004726.html

160 строки
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Problem with DeleteEvent
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mikkel%40linet.dk">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="004720.html">
<LINK REL="Next" HREF="004721.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Problem with DeleteEvent
</H1>
<B>Mikkel Kruse Johnsen
</B>
<A HREF="mailto:mikkel%40linet.dk"
TITLE="[Gtk-sharp-list] Problem with DeleteEvent">mikkel@linet.dk
</A><BR>
<I>Thu, 19 Aug 2004 09:09:22 +0200</I>
<P><UL>
<LI> Previous message: <A HREF="004720.html">[Gtk-sharp-list] Problem with DeleteEvent
</A></li>
<LI> Next message: <A HREF="004721.html">[Gtk-sharp-list] Tooltips in general
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4726">[ date ]</a>
<a href="thread.html#4726">[ thread ]</a>
<a href="subject.html#4726">[ subject ]</a>
<a href="author.html#4726">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8BIT
Hi
I don't think you can do that in delete-event, since the window is
already deleted, but I think you can hook into destroy-event and test it
there, return TRUE to not futher call delete-event or FALSE to continue
with delete-event.
/Mikkel
On Wed, 2004-08-18 at 19:12, miguel díaz wrote:
&gt;<i> hi all,
</I>&gt;<i> in my window delete event i want to test if a text
</I>&gt;<i> view has changed before exiting the application but
</I>&gt;<i> when i run the programm, it ignores it, my warning
</I>&gt;<i> dialog does not appear and mono throw this message:
</I>&gt;<i>
</I>&gt;<i> ...gdk warning: gdk_property_delete:general case not
</I>&gt;<i> implemented
</I>&gt;<i> ...gdk warning: window unexpectedly destroyed
</I>&gt;<i>
</I>&gt;<i> can anyone tell me what is wrong? here my code
</I>&gt;<i>
</I>&gt;<i> public void WindowDelete (object obj, DeleteEventArgs
</I>&gt;<i> args)
</I>&gt;<i> {
</I>&gt;<i> if(contentsModified == true){
</I>&gt;<i> new WarningDialog();
</I>&gt;<i> Application.Quit();
</I>&gt;<i> }
</I>&gt;<i> else{
</I>&gt;<i> Application.Quit();
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! <A HREF="http://uk.messenger.yahoo.com">http://uk.messenger.yahoo.com</A>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Gtk-sharp-list maillist - <A HREF="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</A>
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
</I>
--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)
Content-type: text/html; charset=utf-8
Content-transfer-encoding: 7BIT
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 TRANSITIONAL//EN&quot;&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; CHARSET=UTF-8&quot;&gt;
&lt;META NAME=&quot;GENERATOR&quot; CONTENT=&quot;GtkHTML/3.0.10&quot;&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
Hi&lt;BR&gt;
&lt;BR&gt;
I don't think you can do that in delete-event, since the window is already deleted, but I think you can hook into destroy-event and test it there, return TRUE to not futher call delete-event or FALSE to continue with delete-event.&lt;BR&gt;
&lt;BR&gt;
/Mikkel&lt;BR&gt;
&lt;BR&gt;
On Wed, 2004-08-18 at 19:12, miguel d&amp;#237;az wrote:
&lt;BLOCKQUOTE TYPE=CITE&gt;
&lt;PRE&gt;&lt;FONT COLOR=&quot;#737373&quot;&gt;&lt;I&gt;hi all,
in my window delete event i want to test if a text
view has changed before exiting the application but
when i run the programm, it ignores it, my warning
dialog does not appear and mono throw this message:
...gdk warning: gdk_property_delete:general case not
implemented
...gdk warning: window unexpectedly destroyed
can anyone tell me what is wrong? here my code
public void WindowDelete (object obj, DeleteEventArgs
args)
{
if(contentsModified == true){
new WarningDialog();
Application.Quit();
}
else{
Application.Quit();
}
}
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! &lt;/FONT&gt;&lt;A HREF=&quot;<A HREF="http://uk.messenger.yahoo.com"">http://uk.messenger.yahoo.com&quot;</A>&gt;&lt;U&gt;<A HREF="http://uk.messenger.yahoo.com</U">http://uk.messenger.yahoo.com&lt;/U</A>&gt;&lt;/A&gt;
&lt;FONT COLOR=&quot;#737373&quot;&gt;_______________________________________________
Gtk-sharp-list maillist - <A HREF="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</A>&lt;/FONT&gt;
&lt;A HREF=&quot;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list"">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list&quot;</A>&gt;&lt;U&gt;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</U">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list&lt;/U</A>&gt;&lt;/I&gt;&lt;/A&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
--Boundary_(ID_pbXdjRh1oR1kVdPlTH3Kaw)--
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004720.html">[Gtk-sharp-list] Problem with DeleteEvent
</A></li>
<LI> Next message: <A HREF="004721.html">[Gtk-sharp-list] Tooltips in general
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4726">[ date ]</a>
<a href="thread.html#4726">[ thread ]</a>
<a href="subject.html#4726">[ subject ]</a>
<a href="author.html#4726">[ author ]</a>
</LI>
</UL>
</body></html>