# No implicit cast from Fuse.Reactive.Case

**URL:** https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550
**Category:** Bug Reports
**Created:** [January 11, 2017, 11:40pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550 "2017-01-11T23:40:11Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 11, 2017, 11:40pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/1 "2017-01-11T23:40:11Z")

</div>

I just updated to Fuse version 0.32.0 (build 9613) and I’m receiving errors below when building, or previewing locally or on Android. I have no idea what is wrong with my code. I had the same problem with Fuse 0.30 (build 8529). I’m using Windows 8.

C:\Users\holvan\Documents\Fuse\holvan-mobile\build\Android\Preview\cache\ux11\Holvan.unoproj.g.uno(50.66): E2047: No implicit cast from Fuse.Reactive.Case to Uno.UX.PropertyObject

C:\Users\holvan\Documents\Fuse\holvan-mobile\build\Android\Preview\cache\ux11\Holvan.unoproj.g.uno(50,67,50,73): Error E2047: No implicit cast from Fuse.Reactive.Case to Uno.UX.PropertyObject

Here is a snippet from the Holvan.unoproj.g.uno file.

```auto
46 sealed class Holvan_FuseReactiveCase_String_Property: Uno.UX.Property<string>
48 {
49 [Uno.WeakReference] readonly Fuse.Reactive.Case _obj;
50 public Holvan_FuseReactiveCase_String_Property(Fuse.Reactive.Case obj, global::Uno.UX.Selector name) : base(name) { _obj = obj; }
51 public override global::Uno.UX.PropertyObject Object { get { return _obj; } }
52 public override string Get() { return _obj.String; }
53 public override void Set(string v, global::Uno.UX.IPropertyListener origin) { _obj.String = v; }
54 public override bool SupportsOriginSetter { get { return false; } }
55 }
56 sealed class Holvan_FuseControlsMultiLayoutPanel_LayoutElement_Property: Uno.UX.Property<Fuse.Elements.Element>
57 {
58 [Uno.WeakReference] readonly Fuse.Controls.MultiLayoutPanel _obj;
59 public Holvan_FuseControlsMultiLayoutPanel_LayoutElement_Property(Fuse.Controls.MultiLayoutPanel obj, global::Uno.UX.Selector name) : base(name) { _obj = obj; }
60 public override global::Uno.UX.PropertyObject Object { get { return _obj; } }
61 public override Fuse.Elements.Element Get() { return _obj.LayoutElement; }
62 public override void Set(Fuse.Elements.Element v, global::Uno.UX.IPropertyListener origin) { _obj.LayoutElement = v; }
63 public override bool SupportsOriginSetter { get { return false; } }
}
64 sealed class Holvan_FuseElementsElement_Visibility_Property: Uno.UX.Property<Fuse.Elements.Visibility>
65 {
66 [Uno.WeakReference] readonly Fuse.Elements.Element _obj;
67 public Holvan_FuseElementsElement_Visibility_Property(Fuse.Elements.Element obj, global::Uno.UX.Selector name) : base(name) { _obj = obj; }
68 public override global::Uno.UX.PropertyObject Object { get { return _obj; } }
69 public override Fuse.Elements.Visibility Get() { return _obj.Visibility; }
70 public override void Set(Fuse.Elements.Visibility v, global::Uno.UX.IPropertyListener origin) { _obj.SetVisibility(v, origin); }
71 public override bool SupportsOriginSetter { get { return true; } }
72 }
73 sealed class Holvan_FuseElementsElement_Height_Property: Uno.UX.Property<Uno.UX.Size>
74 {
75 [Uno.WeakReference] readonly Fuse.Elements.Element _obj;
76 public Holvan_FuseElementsElement_Height_Property(Fuse.Elements.Element obj, global::Uno.UX.Selector name) : base(name) { _obj = obj; }
77 public override global::Uno.UX.PropertyObject Object { get { return _obj; } }
78 public override Uno.UX.Size Get() { return _obj.Height; }
79 public override void Set(Uno.UX.Size v, global::Uno.UX.IPropertyListener origin) { _obj.Height = v; }
80 public override bool SupportsOriginSetter { get { return false; } }
81 }

```

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [January 12, 2017, 6:26am UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/2 "2017-01-12T06:26:08Z")

</div>

Did you remember to run `uno clean` on your project after you updated Fuse?

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 12, 2017, 5:50pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/3 "2017-01-12T17:50:00Z")

</div>

Yes.

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [January 16, 2017, 8:48am UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/4 "2017-01-16T08:48:46Z")

</div>

Are you trying to do `<Case Value="{..}" />` ? The case values must be constant.

Can you please provide the UX code in question?

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 16, 2017, 4:52pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/5 "2017-01-16T16:52:19Z")

</div>

I am not using any code like that at all. That is why I am lost. I’ve also put in a request for premium support, but I have not seen a response yet. It’s been several days.

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [January 16, 2017, 5:20pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/6 "2017-01-16T17:20:25Z")

</div>

Can you please upload a project that reproduces the error here?

> **[Dropbox - Submit files](https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

(secure upload that goes directly to us)

Premium support requests are not processed on weekends, but I’m sure you’ll hear back soon.

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 16, 2017, 6:35pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/7 "2017-01-16T18:35:33Z")

</div>

I sent the premium support request on the contact form on Thursday. If you could have the team look into that request, I would appreciate it. I take back my use of the Case class. I am using it. The problem appears to be in this code block:

````auto
    <Each Items="{playlist}">
        <Panel>
            <Match Value="{fileName}">
                <Case String="{Property this.FileName}">
                    <Rectangle ux:Name="SelectedRectangle" Fill="#1976d2" Height="80" CornerRadius="2" Opacity="0">
                        <WhileActive>
                            <Change Duration=".3" SelectedRectangle.Opacity="1" />
                        </WhileActive>
                        <ExitingAnimation>
                            <Change Duration=".3" SelectedRectangle.Opacity="0" />
                        </ExitingAnimation>
                        <StackPanel ContentAlignment="VerticalCenter">
                            <Text TextWrapping="Wrap" Value="{Property this.Title}" Padding="15,15,15,10" TextColor="#fff" FontSize="20" TextAlignment="Center"/>
                            <Text TextWrapping="Wrap" Value="{Property this.Subtitle}" TextColor="#8fc1f0" Padding="15,0,15,15" FontSize="18" TextAlignment="Center"/>
                        </StackPanel>
                    </Rectangle>
                </Case>
            </Match>
        </Panel>
    </Each>```

this.FileName is passed in from a parent ux element. If I change ```<Case String="{Property this.FileName}">``` to ```<Case String="word">``` the project will build, but the program logic is completely broken.

What this code block accomplishes is to highlight all buttons that have already been clicked and added to the playlist from the master list of items.

This was working on Fuse 0.9.10 Build 5788 before we went to 0.32 Build 9613.

Thanks for your help.
````

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [January 17, 2017, 11:51am UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/8 "2017-01-17T11:51:42Z")

</div>

A lot has happened between 0.9 and 0.32, and a few things are not backwards compatible.

As I wrote above, you can’t use bindings on `Case Value="{..}"` unfortunately. However, looks like you just want to compare values.

What about instead of `<Match><Case>`, try:

```
 <WhileTrue Value="{filename} == {Property this.FileName}">
```

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 17, 2017, 12:32pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/9 "2017-01-17T12:32:17Z")

</div>

Thanks Anders; that worked.

Now I am dealing with another problem. When I try to preview the app with a tethered tablet, the app compiles fine, but throws an error while loading. The error is “Dictionary already contains the given key.” I think it has something to do with the layout since the layout goofy now. I’m digging through it.

```auto
I/SurfaceView(21582): updateWindow -- setFrame, this = android.view.SurfaceView{3aa9017a V.E..... ......ID 0,0-1920,1200}
I/SurfaceView(21582): updateWindow -- OnPreDrawListener, mHaveFrame = true, this = android.view.SurfaceView{3aa9017a V.E..... ......ID 0,0-1920,1200}
I/Holvan (21582): Uno.Exception: Dictionary already contains the given key
I/Holvan (21582): at Uno.Collections.Dictionary`2.Add(TKey,TValue)
I/Holvan (21582): at Outracks.Simulator.Runtime.Environment.Bind(Outracks.Simulator.Bytecode.Variable,object)
I/Holvan (21582): at Outracks.Simulator.Runtime.ScopeClosure.Execute(Outracks.Simulator.Bytecode.Lambda,object[])

```

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 17, 2017, 12:50pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/10 "2017-01-17T12:50:39Z")

</div>

Further down in the log I’m seeing this message too:

```auto
I/Holvan (21582): at Outracks.Simulator.Application.OnUpdate()
I/Holvan (21582): at Fuse.App.OnFrameCallback(double,double)
I/Choreographer(21582): Skipped 78 frames! The application may be doing too much work on its main thread.
D/MALI (21582): MTK_CheckAppName:68: appName=com.holvan.medication, acAppName=com.android.gallery3d
D/MALI (21582): MTK_CheckAppName:74: 0
D/MALI (21582): MTK_CheckAppName:68: appName=com.holvan.medication, acAppName=com.android.gallery3d
D/MALI (21582): MTK_CheckAppName:74: 0

```

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [January 17, 2017, 1:18pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/11 "2017-01-17T13:18:46Z")

</div>

Hi, there is not much to go on here, we’ll need you to upload a project that reproduces the error.

Also, when changing topics, please start a new thread. This thread is now closed.

---

<div class="post-metadata">

### Author: ![mike1](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mike1](https://forums.fusetools.com/u/mike1)
#### Post date: [January 17, 2017, 2:47pm UTC](https://forums.fusetools.com/t/no-implicit-cast-from-fuse-reactive-case/5550/12 "2017-01-17T14:47:20Z")

</div>

I just went back to Fuse version 0.12.4 (build 6406) and reserved all the changes I made to get the newer version of Fuse to work. Everything work again now.
