Problem with using ux:Property in Container

when using ux:Property in a Container, and using that as a ux:Class gives unusual errors:

Here’s a little snippet of my code:

<Container ux:Class="OptionsPanel" ux:Name="selfOptions" Subtree="innerPanel" HitTestMode="LocalBoundsAndChildren" Title="Title" Description="Description" Open="false">
		<bool ux:Property="Open" />
		<string ux:Property="Title" />
		<string ux:Property="Description" />
		<WhileTrue Value="{Property this.Open}">
			<Set OptionsControlPanel.Active="main" />

The primary issue is that Fuse doesn’t seem to recognise that this refers to the properties, I get this error:

E8001: 'this' declared in MainAppContainer.ux(1) is a member 'MainAppPage' and cannot be accessed from 'OptionsPanel'. To make this work, consider making 'OptionsPanel' an ux:InnerClass of 'MainAppPage'.

The MainAppPage is the parent page of the page that contains the Container.


This looks like a bug. However, it is not generally reproducible, so there must be something else in your project causing the error. Can you please upload a complete test project that reproduces the error?


Here’s a full example:

	<Container ux:Class="OptionsPanel" ux:Name="selfOptions" Subtree="innerPanel" Open="false">
		<bool ux:Property="Open" />
		<WhileTrue Value="{Property this.Open}">
			<Rectangle Color="#0f0" />
		<Panel ux:Name="innerPanel" />

While making this, I discovered that I can get rid of the error by removing ux:Name="selfOptions".


Yes. this is the default ux:Name of the node with the ux:Class attribute. If you give it an explicit ux:Name, you can no longer use this to refer to that node.

The error message could have been better, but at least not a critical bug then. Thanks for reporting!