fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Cannot use a relative name for `Model` #563

Open mortoray opened 7 years ago

mortoray commented 7 years ago

I'm unable to use a relative name for the Model attribute. I have a Components directory with a ColorSelector in it. Then this UX:

<Panel ux:Class="ColorSelector" Model="ColorSelector">
    <float3 ux:Property="Value"/>
    <Panel Color="{Property this.Value}" Alignment="TopRight" Width="50" Height="50"/>
</Panel>

My .unoproj has **.js:FuseJS so I'd expect the above to work.

Trying Model="./ColorSelector" instead I get the error Expected end of expression, found '.' at end of "

This blocks one from writing an isolated component.

sebbert commented 7 years ago

This is by design according to @Duckers

mortoray commented 7 years ago

I'm reopening this since it makes it impossible to write self-contained components. There is no way you could package a component into a directory and have it work -- which is a critical requirement of components.

Duckers commented 6 years ago

I'm not conceptually against relative paths, its just currently not trivial to implement.