Match/Case issue


I don’t know if it’s actually a bug or if I’m using it badly, but I have a problem with the Match/Case thing.

Here is my (simplified for a test case) code : MainView.js

var Observable = require('FuseJS/Observable');

var model = {
    fields: [{
        type: 'Text'
    }, {
        type: 'Image'

module.exports = {
    model: Observable(model)


<App Theme="Basic" Background="#eeeeeeff">
    <JavaScript File="MainView.js"></JavaScript>
        <Each Items="{model.fields}">
                <Text Value="Item :" />
                <Match Value="{type}">
                    <Case Value="Text">
                    <Case Value="Image">

And it raises this error during the build : None of the global resources with alias 'Text' can be used here: The type must be compatible with 'object'. - [...]MainView.ux(8:1):E

Thanks for your help !

Try with this:

          <Case String="Text">
            <Text Value="Text" />
          <Case String="Image">
            <Text Value="Image" />


Many thanks, it works !

For Case you should use Bool, Number and String to check the value.

OK thanks.

Maybe the Learn section deserves an update then : :slight_smile:

EDIT : My bad, I was looking at the Localisation section.

Looks like the thing it says in the Learn is what I told you. You used Value in your case which is not working.

Uh my bad I was looking at the “Localization” section where “Value” is used…