Hi all,
I’m trying to custom grasshopper by override certain methods in GH_Component. However, there are two errors. Not sure if I’m missing something obvious here.
public class MyClass : GH_Component
{
↓↓↓↓↓↓↓↓
protected override void AppendAdditionalComponentMenuItems(System.Windows.Forms.ToolStripDropDown menu)
{
↓↓↓↓
base.AppendAdditionalComponentMenuItems(menu);
Menu_AppendItem(menu, "My Custom Menu Item");
Menu_AppendObjectNameEx(menu);
}
}
I have two error at the bold words.
1: Override. It says There is no suitable methods for override (There is obviously is!?)
2. Menu: Argument type is not assignable to parameter type (how can it be not suitable when they are exactly the same type. I already included System.WindowsForms)
Some people on SpaceSyntax encountered similar problem before but they were answered to check the base class, in this case is GH_Component.
Thank you very much!