Question

The architecture is based on the use of the following frameworks: Flex, Cairngorm and Parsley.

I use a dispatcher with an event "AdicionarItemVendaMercadoriaEvent" within a popuppanel: PopupPanel.

I capture the event with [MessageHandler] within the FormPM.as injected into Form.mxml. Within Form.mxml, I have a mx: TabNavigator and each tab is within one s: NavigatorContent.

It turns out that when there is more than one open tab mx: TabNavigator the dispatched event is captured in all Form of all tabs.

Normal operation was to capture the only event of the tab where the PopupPanel was dispatched, not all tabs.

Please, any suggestions for solving this problem?

I appreciate the help.

No correct solution

OTHER TIPS

How about using straight forward function callbacks?

When you create your PopUpPanel, pass in a function callback that you want to be executed when the popup is closed. Rather than using an event, you'd simply call the function. i.e.

Inside FormPM:

public function showPopup():void
{
    var popup:PopUpPanel = new PopUpPanel();
    popup.onCompletion = handleResult;
    PopUpManager.addPopUp(popup, ...);
}

private function handleResult(someData:*):void 
{
   // My popup has completed.. what do I want to do with the result.
}

You might want to consider the Spicelib 3.0 command framework and have a command to popup your panel and then add the error/success callbacks to that: http://www.spicefactory.org/parsley/docs/3.0/manual/?page=commands&section=intro

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top