mail-archives/gtk-sharp-list/2007-June/008112.html

124 строки
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Hiding a window
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Hiding%20a%20window&In-Reply-To=455de9380706201356x7801658ds8534d2f5ac1c5bd0%40mail.gmail.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="008111.html">
<LINK REL="Next" HREF="008113.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Hiding a window</H1>
<B>S&#248;ren Juul</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Hiding%20a%20window&In-Reply-To=455de9380706201356x7801658ds8534d2f5ac1c5bd0%40mail.gmail.com"
TITLE="[Gtk-sharp-list] Hiding a window">zpon.dk at gmail.com
</A><BR>
<I>Wed Jun 20 17:04:37 EDT 2007</I>
<P><UL>
<LI>Previous message: <A HREF="008111.html">[Gtk-sharp-list] Hiding a window
</A></li>
<LI>Next message: <A HREF="008113.html">[Gtk-sharp-list] Hiding a window
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8112">[ date ]</a>
<a href="thread.html#8112">[ thread ]</a>
<a href="subject.html#8112">[ subject ]</a>
<a href="author.html#8112">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Yes of course, the source code is at <A HREF="http://www.zpon.dk/tmp/test.cs">http://www.zpon.dk/tmp/test.cs</A> - sorry
if it is messy
S&#248;ren Juul
2007/6/20, Jacob Ils&#248; Christensen &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">jacobilsoe at gmail.com</A>&gt;:
&gt;<i>
</I>&gt;<i> Hi.
</I>&gt;<i>
</I>&gt;<i> Can you supply the source code? Then it's easier to determine what's
</I>&gt;<i> wrong.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i> Jacob
</I>&gt;<i>
</I>&gt;<i> On 6/20/07, S&#248;ren Juul &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">zpon.dk at gmail.com</A>&gt; wrote:
</I>&gt;<i> &gt; Hi
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I am working on a very small (simple) application, mainly to get to know
</I>&gt;<i> &gt; gtk-sharp better. But I need to hide a window, while another is showing.
</I>&gt;<i> I
</I>&gt;<i> &gt; want to do this when a button is pushed, I thought I could do this from
</I>&gt;<i> the
</I>&gt;<i> &gt; function connected to the button with the EventHandler, such as &quot;
</I>&gt;<i> &gt; button.Clicked += new EventHandler(next);&quot;
</I>&gt;<i> &gt; and put something like &quot;win.Visible = false;&quot; in that function, but when
</I>&gt;<i> I
</I>&gt;<i> &gt; do this I get a terrible error:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Unhandled Exception: System.NullReferenceException : Object reference
</I>&gt;<i> not
</I>&gt;<i> &gt; set to an instance of an object
</I>&gt;<i> &gt; at dataHolder.test (System.Object temp) [0x00000]
</I>&gt;<i> &gt; at inputWindow.next (System.Object obj, System.EventArgs args)
</I>&gt;<i> [0x00000]
</I>&gt;<i> &gt; at (wrapper delegate-invoke)
</I>&gt;<i> &gt; System.MulticastDelegate:invoke_void_object_EventArgs
</I>&gt;<i> &gt; (object,System.EventArgs)
</I>&gt;<i> &gt; at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch)
</I>&gt;<i> [0x00000]
</I>&gt;<i> &gt; at (wrapper native-to-managed) GLib.Signal:voidObjectCallback
</I>&gt;<i> &gt; (intptr,intptr)
</I>&gt;<i> &gt; at &lt;0x00000&gt; &lt;unknown method&gt;
</I>&gt;<i> &gt; at (wrapper managed-to-native) Gtk.Application:gtk_main ()
</I>&gt;<i> &gt; at Gtk.Application.Run () [0x00000]
</I>&gt;<i> &gt; at inputWindow.makeWindow () [0x00000]
</I>&gt;<i> &gt; at inputWindow..ctor ( System.Object temp) [0x00000]
</I>&gt;<i> &gt; at Sample.Main () [0x00000]
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; How can I avoid this? Hope my description was understandable, but pleas
</I>&gt;<i> ask
</I>&gt;<i> &gt; if there is something you don't understand.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thanks in advance
</I>&gt;<i> &gt; S&#248;ren Juul
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; _______________________________________________
</I>&gt;<i> &gt; Gtk-sharp-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>
</I>&gt;<i> &gt; <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070620/74ff774f/attachment-0001.html">http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070620/74ff774f/attachment-0001.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="008111.html">[Gtk-sharp-list] Hiding a window
</A></li>
<LI>Next message: <A HREF="008113.html">[Gtk-sharp-list] Hiding a window
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8112">[ date ]</a>
<a href="thread.html#8112">[ thread ]</a>
<a href="subject.html#8112">[ subject ]</a>
<a href="author.html#8112">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>