Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Only one Mediator Instead of One for every single Thumbnail!!!  (Read 6414 times)
yeremy
Jr. Member
**
Posts: 11


View Profile Email
« on: December 01, 2009, 11:22:15 »

Hi All... i have an issue...
...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.

« Last Edit: December 01, 2009, 11:27:23 by yeremy » Logged
yeremy
Jr. Member
**
Posts: 11


View Profile Email
« Reply #1 on: December 02, 2009, 12:54:45 »

I found the answer to this in here :  http://forums.puremvc.org/index.php?topic=596.0

Thanks JJfutbol.
Logged
Pages: [1]
Print