PureMVC Architects Lounge

Announcements and General Discussion => Getting Started => Topic started by: mores on September 02, 2008, 12:57:10



Title: Blocking one Command on completion of another
Post by: mores on September 02, 2008, 12:57:10
Is it possible to block one command on the completion of another ?

example:

Lets say command1 performs a URLLoader.load( URLRequest() );
command2 also performs a URLLoader.load( URLRequest() );


If I create a MacroCommand()
{
      addSubCommand( command1 );
      addSubCommand( command2 );
}

I see it will be true that the request for command1 will be sent before the request for command2, but isn't possible that the Event.COMPLETE for command2 occurs before the Event.COMPLETE of command1 ?







Title: Re: Blocking one Command on completion of another
Post by: mores on September 03, 2008, 08:26:59
On page 18 of "Implementation Idioms and Best Practices" it says:

Commands may be used orchestrate complex system behaviors that must happen in a specific order, and where it is possible that the results of one action might feed the next."

Are there any examples where the results of one action is feeding another action ?


Title: Re: Blocking one Command on completion of another
Post by: puremvc on September 04, 2008, 12:45:40
Two utilities exist that may help you: StartupManager see the AS3 standard port utils) and Trilec's Notification Chaining Utility) which hasn't been put in the repository yet but you can find here: http://forums.puremvc.org/index.php?topic=422

-=Cliff>