NOTE: This seems to be a fairly common error in MonoDevelop.
I am working on updating a C# Mono application I wrote. I'm having trouble with some dialogs, used by the application.
For example, in the following code:
public partial class Generic : Gtk.Dialog
{
public Generic (string text, string title = "Error Notice", string label = "<b>Error Details</b>", int height = 150)
{
this.Build ();
textview1.Buffer.Text = text;
this.Title = "Application - " + title;
label1.LabelProp = label;
this.DefaultHeight = height;
this.Resize(375, this.DefaultHeight);
}
protected void OnButtonOkClicked (object sender, System.EventArgs e)
{
this.Destroy();
}
}
I get these errors:
Error CS1061: Type `Namespace.Generic' does not contain a definition for `Build' and no extension method `Build' of type `Namespace.Generic' could be found (are you missing a using directive or an assembly reference?) (CS1061) (Namespace)
Error CS0103: The name `textview1' does not exist in the current context (CS0103) (Namespace)
As well as another one for label1. The thing is that textview1 does exist. So why MonoDevelop is telling me it doesn't I don't know.
I think this.Build
is inherited from Gtk.Dialog. Correct?
These were working earlier, but now, even after remaking the dialogs from scratch and just reentering the old code for the functionality it still doesn't work.
My old compiles still work, so while I don't know for sure, that would seem to indicate that GTK# is working fine...
Any help is appreciated. Thanks.