Hi,
I have a problem with unloading module, which I loads dynamically.
Here is a fragment my code:

<TitledWindow .......creationComplete="init()"/>
......
<mx:Accordion id="lista_ryzyk">
</mx:Accordion>
.....
<mx:Script>
...
public function init():void
{
    CairngormEventDispatcher.getInstance().addEventListener
(LoadRisksEvent.EVENT_RE SULT, populateAccordion);
......
}

public function populateAccordion(event:CairngormEvent):void
{
...
     lista_ryzyk.removeAllChildern();
     for (i in risks)
     {
          var m:ModuleLoader = new ModuleLoader();
          m.url = path_to_module;
          m.label = module_label;
          m.loadModule();
     }
     lista_ryzyk.addChildAt(m,Number(i));
....
}
....
</mx:Script>

The modules loads fine. Each module adds own eventListener for some
event. It works fine, but ONLY for first time. For next invoke
populateAccordion function, the modules loads, but don't reacts for
event. I investigate !!! that for dispatched events reacts modules,
which was loaded for the first time!!! It seems like the first
instance remains in application all time. How to remove it? I try to
call the unloadModule() function, but it does't work:-(

I try to fix that from wednesday, and it goes me crazy!!!
Could anyone help me?? Please.

Regards,
Mariusz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to