[Gtk-sharp-list] label -> nullpointer exception
Michael
26031@t-link.de
Wed, 30 Jun 2004 22:21:37 +0200
Hi,
a calendar popup window (with a okay button) should the user let choose
a datum.
The data recieved from the popup window should be shown on an other
button (show). Instead of a label change a
"System.NullReferenceException" is thrown.
Which is a little rare, because all widgets which were build with glade,
are defined in the .cs file.
Here the code snip:
---
// if the button from the main window
// is pressed the calendar popup shows
void DatumButton_clicked(object o, EventArgs args)
{
Glade.XML dxml = new Glade.XML "Gui/project5.glade", "window3",
"window1");
dxml.Autoconnect (this);
}
// if the button from the popup window is pressed
// the label from the main window button should change
void DatumOKButton (object obj, EventArgs args)
{
DatumButton.Label = calendar3.GetDate ().ToString ("yyyy/MM/dd");
window3.Destroy();
}
----
Does anybody know what I am doing wrong?
(Label change by button press from the main window do work)
Greetings
Michael
P. S. Sorry for the last mail. Went out a little bit too fast out.