...i lost all my flex projects in my stolen laptop, so i've stated to do all my projects from zero, the problem is that some code that i used to use, now doesn't work....that is weird.
The issue is : in a panel Component Mediator ( WetsuitViewMediator.as) wich has a component associated (WetsuitView.mxml)... i have the following code that create thumbnails from another component (TemplatePiezaItem.mxml)
var n:int = (_templateProxy.templates[0] as TemplateVO).Piezas.length;
viewInstance.entidadItems = new Array(n);
for (i=0; i < n; i++)
{
var componentItem : TemplatePiezaItem = new TemplatePiezaItem();
viewInstance.entidadItems[i] = componentItem;
viewInstance.entidadItems[i].showInAutomationHierarchy = true;
componentItem._templatePiezaVO = (_templateProxy.templates[0] as TemplateVO).Piezas.getItemAt(i) as TemplatePiezaVO;
componentItem.source = componentItem._templatePiezaVO.ImagePath;
viewInstance.entidadContent.addChild(componentItem);
//piezaItem.piezaColor.setStyle( "backgroundColor", piezaItem.wetsuitPiezaVO.codigoHexa );
var mediator : TemplatePiezaItemMediator = new TemplatePiezaItemMediator( componentItem );
facade.registerMediator( mediator );
}
with above code i have thumbnails of TemplatePiezaItem .mxml in WetsuitView.mxml.
THE PROBLEM is that instead of every single TemplatePiezaItem component has its own TemplatePiezaItemMediator...i only have ONE TemplatePiezaItemMediator for all of them.
i don't understand that's wrong...it worked fine to me before.
Thanks in advance.