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: Blocking one Command on completion of another  (Read 6827 times)
mores
Newbie
*
Posts: 5


View Profile Email
« 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 ?





Logged
mores
Newbie
*
Posts: 5


View Profile Email
« Reply #1 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 ?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 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>
Logged
Pages: [1]
Print