Hi<br><br>I am working on a very small (simple) application, mainly to get to know gtk-sharp better. But I need to hide a window, while another is showing. I want to do this when a button is pushed, I thought I could do this from the function connected to the button with the EventHandler, such as "
button.Clicked += new EventHandler(next);"<br>and put something like "win.Visible = false;" in that function, but when I do this I get a terrible error:<br><br>Unhandled Exception: System.NullReferenceException
: Object reference not set to an instance of an object<br> at dataHolder.test (System.Object temp) [0x00000] <br> at inputWindow.next (System.Object obj, System.EventArgs args) [0x00000] <br> at (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)<br> at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000] <br> at (wrapper native-to-managed) GLib.Signal:voidObjectCallback
(intptr,intptr)<br> at <0x00000> <unknown method><br> at (wrapper managed-to-native) Gtk.Application:gtk_main ()<br> at Gtk.Application.Run () [0x00000] <br> at inputWindow.makeWindow () [0x00000] <br> at inputWindow..ctor (
System.Object temp) [0x00000] <br> at Sample.Main () [0x00000]<br><br>How can I avoid this? Hope my description was understandable, but pleas ask if there is something you don't understand.<br><br>Thanks in advance<br>
Søren Juul<br>