本文介绍了错误:预期的类,委托,枚举,接口或结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到以下错误下面的代码:
This happens when hovering on GH_ObjectResponse, what am I doing wrong?
public class SettingsComponentAttributes : GH_ComponentAttributes
{
public SettingsComponentAttributes(IGH_Component SettingsComponent) :
base(SettingsComponent) {}
}
public override GH_ObjectResponse RespondToMouseDoubleClick(
GH_Canvas sender, GH_CanvasMouseEvent e)
{
((SettingsComponent)Owner).ShowSettingsGui();
return GH_ObjectResponse.Handled;
}
解决方案
Your method is not declared inside the class... try this instead:
public class SettingsComponentAttributes : GH_ComponentAttributes
{
public SettingsComponentAttributes(IGH_Component SettingsComponent) : base(SettingsComponent) { }
public override GH_ObjectResponse RespondToMouseDoubleClick(GH_Canvas sender, GH_CanvasMouseEvent e)
{
((SettingsComponent)Owner).ShowSettingsGui();
return GH_ObjectResponse.Handled;
}
}
这篇关于错误:预期的类,委托,枚举,接口或结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!