RoundButton.ux(13): E8001: 'this' declared in MainView.ux(1) is a member of 'MainView' and cannot be accessed from 'RoundButton'. To make this work, consider making 'RoundButton' an ux:InnerClass of 'MainView'.
RoundButton.ux(13,1): Error E8001: 'this' declared in MainView.ux(1) is a member of 'MainView' and cannot be accessed from 'RoundButton'. To make this work, consider making 'RoundButton' an ux:InnerClass of 'MainView'.
RoundButton.ux(13): E8001: 'this' does not contain property 'LabelA'
RoundButton.ux(13,1): Error E8001: 'this' does not contain property 'LabelA'
{ReadProperty is a one-way binding (data-source-to-property) and {Property is a two-way binding (also property-to-data-source).
If you have encountered any other differences between the two, that might be a bug in the UX compiler. I’ll file an issue to have it investigated. In the meantime, does it help to qualify the property with this. ?
Note that we can still use the this.* qualifier since it’s implicitly available within a ux:Class, and you don’t need to explicitly define a self name on the node.
After investigating this a bit more, we’ve found the following.
this is the implied Name of a ux:Class, so you can refer to properties inside of a class by either omitting the prefix {ReadProperty Property} or by using it {ReadProperty this.Property}.
When you assign an explicit Name to a ux:Class - which you might need to do when you’re working with nested ux:Classes - then the implied this is replaced by the new name you gave it and this isn’t available anymore. So in this case, you are required to refer to class properties by using the explicit name you assigned, like so: {ReadProperty theName.Property}.