AddOptionInteger returns unsucessfully

in the simple snippet

         var go = new Rhino.Input.Custom.GetObject();
        go.SetCommandPrompt("Select the input boundary curve you want to use for controlling the tween curves.");
        go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve;
        var type = new OptionInteger(2, 1, 3);
        int oi = go.AddOptionInteger("Control type", ref type,
            "Select the shape of control you want to add: Gaussian(1)," +
            "Rectangle (2), " +
            "Triangle (3), ");

oi ends up being zero, in other words the method AddOptionInteger of the GetObject returns unsucessfully. I seemed unable to figure out the reason for its failing.

And, if I may add a second question: what is the typical use case for a GetOption object, if options can be added directly to a GetObject without constructing a GetOption? Is this just for the rare case when a command does not need to reference a document object? (it doesn’t help the intuition that both classes are typically instanced with an object called “go”, and have a few similiar/overlapping method names.)

Hi @mathias.fuchs , try removing the white spaces in your option name…“ControlType” instead of “Control type”

Thx, @Darryl_Menezes … not so easy to guess that, for the uninitiated, but easy to fix.