RF0110: Inspector button must return Callable
ExportToolButton is applied to a Variant property instead of Callable. The expression creates a Callable, but the declared property type is still Variant.
For a C# project using Reckfell.NET.Sdk 1.0.0. Fix the first build error first: later messages may be a consequence.
Cause
ExportToolButton is applied to a Variant property instead of Callable. The expression creates a Callable, but the declared property type is still Variant.
Fix
Return Callable.From with the handler. The attribute argument sets the caption, not the property type.
Failing example
Save the file in a test C# project and run dotnet build. This version intentionally fails to build.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0110;
[Tool]
public partial class Example : Entity
{
public int Count { get; private set; } = 7;
[ExportToolButton("Reset")] public Variant ResetButton => Callable.From(Reset);
private void Reset() => Count = 0;
}Expected messages: RF0110.
Working version
Replace the failing version with these files; do not keep both declarations in the project.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0110;
[Tool]
public partial class Example : Entity
{
public int Count { get; private set; } = 7;
[ExportToolButton("Reset")] public Callable ResetButton => Callable.From(Reset);
private void Reset() => Count = 0;
}Result
ResetButton is a Callable; ResetButton.Call() resets Count.
If the getter returns a string literal rather than directly creating a Callable, RF0111 may appear first. Fix both the property type and its getter expression.