dotnet-websharper / ui

A reactive UI library for WebSharper.
https://websharper-samples.github.io/ui/
Apache License 2.0
77 stars 22 forks source link

Auto-generated Template file not compiling (C#) #190

Closed V0d01ey closed 6 years ago

V0d01ey commented 6 years ago

When adding following tag to template file Websharper generates cs-file with compilation errors.

<input type="number" name="meridConv" ws-var="meridConv" min="-90" max="90" step="0.01" />
    [JavaScript]
    public class Uploaddialogtemplate
    {
...
        public Uploaddialogtemplate meridConv(Var<CheckedInput<int>> x) { holes.Add(TemplateHole.NewVarInt("meridconv", x)); return this; }
        public Uploaddialogtemplate meridConv(Var<double> x) { holes.Add(TemplateHole.NewVardoubleUnchecked("meridconv", x)); return this; }
        public Uploaddialogtemplate meridConv(Var<CheckedInput<double>> x) { holes.Add(TemplateHole.NewVardouble("meridconv", x)); return this; }
...
    }

Compilation Errors:

CS0246 The type or namespace name 'CheckedInput<>' could not be found (are you missing a using directive or an assembly reference?)
CS0117 'TemplateHole' does not contain a definition for 'NewVardoubleUnchecked'
CS0117 'TemplateHole' does not contain a definition for 'NewVardouble'