rafalszemraj / fabrication

Automatically exported from code.google.com/p/fabrication
2 stars 1 forks source link

Problem with PopUpManager and reactTo method on a TitleWindow's Mediator #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Exec a command that creates a View Component with PopUpManager
     override public function execute(note:INotification):void
     {
         var stwf:SomeTitleWindowForm = 
           PopUpManager.createPopUp(
                                     fabrication as UIComponent,
                                     SomeTitleWindowForm, true
                                    ) as SomeTitleWindowForm;

         if (!fabFacade.hasMediator(SomeTitleWindowFormMediator.NAME))
         {
             fabFacade.registerMediator(new SomeTitleWindowForm(stwf));
         }
         else
         {
             fabFacade.retrieveMediator(SomeTitleWindowForm.NAME)
                      .setViewComponent(stwf);
         }
    }
2. In the mediator I've this:
    public function get someTitleWindowForm(): SomeTitleWindowForm
    {
        return viewComponent as SomeTitleWindowForm;
    }
    public function reactTo SomeTitleWindowFormClose(e:Event):void
    {
       close();
    }
3. First time that I exec the command, the reactTo method, works fine, but 
all next times did nothing.

What is the expected output? What do you see instead?
    TitleWindow's close button close the window (reactTo

What version of the product are you using? On what operating system?
    fabrication-0.6-flex.swc
    Utility_AS3_MultiCore_Pipes_1_1.swc   
    PureMVC_AS3_MultiCore_1_0_5.swc

Please provide any additional information below.

I'm dealing with some problems with PopUpManager, first time that I use 
PopUpManager.createPopUp with some form on it, my "reactTo" method works 
fine (on close event, is TitleWindow), but next, always fails, it's like 
fabrication removes the listener and never add it again... I don't know.

Original issue reported on code.google.com by jtiss...@gmail.com on 15 Jul 2009 at 1:57

GoogleCodeExporter commented 9 years ago
If I remove mediator and re-register works fine...

Original comment by jtiss...@gmail.com on 15 Jul 2009 at 3:35

GoogleCodeExporter commented 9 years ago
Currently Reactions are initialized in onRegister. Doing this in setComponent 
is too 
early in the init sequence. Will look into ways to do reinitialization.

Original comment by darshan....@gmail.com on 1 Aug 2009 at 4:31

GoogleCodeExporter commented 9 years ago
I have a same problem now,how?

Original comment by yxlong1...@gmail.com on 16 Mar 2012 at 4:49