Page 1 of 1

Runtime error for certain control names

Posted: Wed Sep 13, 2017 10:49 am
by rkmore
I found that when I create a control like this.....

<Canvas>
<TextBlock Text="Error Example" x:Name="Width" Canvas.Left="20" Canvas.Top="30"/>
</Canvas>

where "Width" is a property of the container as well as the name of the control then it works fine in a UWP app and in the simulator but in a browser you get the following error (which makes sense):

Uncaught TypeError: Cannot read property 'ContainsKey' of undefined
at ErrorExample_MainPage.DependencyObject_SetValueInternal (app-cshtml5/app/CSharpXamlForHtml5.js?20179131445:2870)
at ErrorExample_MainPage.DependencyObject_SetValue (app-cshtml5/app/CSharpXamlForHtml5.js?20179131445:2859)
at ErrorExample_MainPage.FrameworkElement_set_Width (app-cshtml5/app/CSharpXamlForHtml5.js?20179131445:6464)
at ErrorExample_MainPage_InitializeFields (jsil://closure/ErrorExample.MainPage.In ... eFields:35)
at ErrorExample_MainPage (jsil://closure/ErrorExample.MainPage:12)
at ErrorExample_App.App__ctor (app-cshtml5/app/ErrorExample.js?20179131445:29)
at ErrorExample_App (jsil://closure/ErrorExample.App:17)
at runMain (index.html:32)
at browserFinishedLoadingCallback (JSIL.Browser.js:1138)

It seems to me that the JSIL compiler should catch this error or give a warning.

RKM

Re: Runtime error for certain control names

Posted: Wed Oct 11, 2017 2:18 am
by JS-Support @Userware
Thanks for reporting this issue.

We are going to fix it asap!

Regards,
JS-Support