Estoy intentando hacer un lector rss para ir aprendiendo flex 3. He creado un componente (basado en canvas) que tiene un label y un textArea.
Cuando traigo la info del rss (estoy probando con noticias de google), con un bucle voy generando tantos componentes como noticias tenga. El tema es que no me muestra nada el textArea si uso el textHtml. En cambio si uso la propiedad text me muestra todo (pero obviamente con los tag html en texto plano).
el código que uso es el siguiente:
En el mxml principal (solo muestro una porción del código):
Código :
var Y:Number = 100;
/*noticiasGoogle es una clase que hace el pedido mediante un httpService y el resultado lo guarda en un arrayCollection
noticiasGoogle.noticias es el arrayCollection*/
for (var i:int = 0; i < noticiasGoogle.noticias.length; i++){
//noticia es mi custom componente
var noticia:Noticia = new Noticia();
noticia.name = "noticia"+i;
noticia.x = 32.5;
noticia.y = Y;
noticia.titulo = noticiasGoogle.noticias.getItemAt(i).title;
noticia.texto = noticiasGoogle.noticias.getItemAt(i).description;
addChild(noticia);
Y += 165;
}
y mi componente noticias:
Código :
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="700" height="160" borderStyle="outset" borderColor="#20BC0B" cornerRadius="20">
<mx:Script>
<![CDATA[
[Bindable] public var titulo:String;
[Bindable] public var texto:String;
]]>
</mx:Script>
<mx:Label x="89" y="10" id="txtTitulo" text="{titulo}"/>
<mx:TextArea y="40" height="80" left="90" right="10" editable="false" id="txtTexto"
htmlText="{texto}"/>
</mx:Canvas>
Desde ya muchas gracias por cualquier sugerencia.
