Wednesday, June 23, 2010

Flex Compiler Error - Could not resolve * to a component implementation

While extending MX control ComboBox, I am trying to alter it's property.

<mx:dropdownfactory>
<mx:component>
<mx:tree change="outerDocument.updateLabel()" height="200" allowmultipleselection="{outerDocument.allowMultipleSelection}" showroot="{outerDocument.showRoot}" showdatatips="true" datatipfield="{outerDocument.labelField}">
</mx:tree>
</mx:component>
</mx:dropdownfactory>

I got the compiler error as stated in the tile. Turns out I should refer to the property using my custom control's own name space. So the code should be like this:

<local:dropdownfactory>
<mx:component>
<mx:tree change="outerDocument.updateLabel()" height="200" allowmultipleselection="{outerDocument.allowMultipleSelection}" showroot="{outerDocument.showRoot}" showdatatips="true" datatipfield="{outerDocument.labelField}">
</mx:tree>
</mx:component>
</local:dropdownfactory>

No comments: