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
PureMVC Architects Lounge
Announcements and General Discussion
General Discussion
Chain Commands that Don't Execute Until Previous Command Does
Pages: [
1
]
« previous
next »
Author
Topic: Chain Commands that Don't Execute Until Previous Command Does (Read 9456 times)
codecraig
Full Member
Posts: 23
Chain Commands that Don't Execute Until Previous Command Does
«
on:
September 09, 2008, 08:38:55 »
I have a MacroCommand and it executes Command A, B, then C. Currently B needs some data that A gets to do it's function. However, A calls a remote object asynchronously so it's 'execute' method finishes quickly and the MacroCommand calls B.execute.
Should I implement something that causes MacroCommand to wait for A to "finish" before calling B? or Should I create a special Proxy that stores the temporary results for me?
Thanks!
Logged
codecraig
Full Member
Posts: 23
Re: Chain Commands that Don't Execute Until Previous Command Does
«
Reply #1 on:
September 09, 2008, 10:13:06 »
My approach right now is to create my MacroCommand type of class that will pass a "finishedCallback" to each command before calling "execute" on it. Then it sits until a command finishes, then calls the next one. My subcommands actually modify the body of the notification as they move along.
works for me...anyone else try this?
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Chain Commands that Don't Execute Until Previous Command Does
«
Reply #2 on:
September 10, 2008, 04:38:16 »
Have a look at Trilec's Notification Chaining utility:
http://forums.puremvc.org/index.php?topic=422.0
-=Cliff>
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...