[Gtk-sharp-list] Hiding a window
zpon.dk at gmail.com
Wed Jun 20 16:45:57 EDT 2007
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);"
and put something like "win.Visible = false;" in that function, but when I
do this I get a terrible error:
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object
at dataHolder.test (System.Object temp) [0x00000]
at inputWindow.next (System.Object obj, System.EventArgs args) [0x00000]
at (wrapper delegate-invoke)
at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000]
at (wrapper native-to-managed) GLib.Signal:voidObjectCallback(intptr,intptr)
at <0x00000> <unknown method>
at (wrapper managed-to-native) Gtk.Application:gtk_main ()
at Gtk.Application.Run () [0x00000]
at inputWindow.makeWindow () [0x00000]
at inputWindow..ctor (System.Object temp) [0x00000]
at Sample.Main () [0x00000]
How can I avoid this? Hope my description was understandable, but pleas ask
if there is something you don't understand.
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list