Flex adding subelements as properties to a custom component
- Wordpress category:
I was trying to extend a TextArea control, and all was working well untill I tried to use my class like the following:
<widget:myhtmltextarea> <mx:htmltext> <!--[CDATA[ <DIV STYLE="text-align:LEFT;"><SPAN STYLE="color:#7DB73F;font-size:20px;font-family:'Times New Roman';">Title Text</SPAN></DIV> ]]--></mx:htmltext> </widget:myhtmltextarea>
which of course resulted in the nice cryptic error message :
Could not resolve <mx:htmltext> to a component implementation.
after searching I found this post which explained it all.
turns out you must declare the property as part of the same namespace so the correct syntax would have been :
<widget:myhtmltextarea> <widget:htmltext> <!--[CDATA[ <DIV STYLE="text-align:LEFT;"><SPAN STYLE="color:#7DB73F;font-size:20px;font-family:'Times New Roman';">Title Text</SPAN></DIV> ]]--></widget:htmltext> </widget:myhtmltextarea>
Trackback URL for this post:
http://www.softwarebyrichard.com/trackback/38

Recent comments
25 weeks 5 days ago
27 weeks 13 hours ago
1 year 28 weeks ago
1 year 30 weeks ago
2 years 43 weeks ago
1 year 46 weeks ago
1 year 46 weeks ago
1 year 47 weeks ago
1 year 50 weeks ago
1 year 50 weeks ago