Today I’ve been extending mx:TitleWindow component. And I wanted to have a TextInput called ‘name’. However, when I added
<mx:TextInput id="name" ... />
then I was getting funny errors like
Attempting to initialize inherited property 'name' of type 'String' with value of incompatible type 'mx.controls.TextInput'
You can define and access visual subcomponents in Flex MXML very easily. They are almost equivalent to properties and subcomponents defined via Action Script. Adobe standard components and classes have plenty of properties and methods. However, that is a double-sided sward – because you may want to use the same property name or subcomponent id for something else, and you just can’t.
Solution: You can put your properties into a separate object, or separate them in some other way. Or call your properties/subcomponents by some other name.