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
PureMVC Architects Lounge
Announcements and General Discussion
Topic: MacroCommand (Read 4542 times)
February 19, 2008, 04:54:17 »
A MacroCommand dispatches its Notification to all of its sub commands.
But how could we dispatch only an identified part of the body to a particular sub command ?
MyMacroCommand receives [A, B, C] as body of its Notification.
We would like that subCommand1 deals with A, subCommand2 with A and B and subCommand3 with A and C.
(These 3 sub commands are used independently elsewhere in the App...)
Thanks, in advance...
Reply #1 on:
February 19, 2008, 06:42:01 »
The beauty of the MacroCommand is it doesn't need any logic, just a stack of SubCommands to notify.
In your situation the simplest answer, since the other Commands are already registered and usabe independently is to use another SimpleCommand.
In its execute method, send 3 notifications, each with the correct part of the 3 part note body that was received.
Reply #2 on:
February 20, 2008, 02:59:30 »
Thank you very mych.
Powered by SMF 2.0.15
SMF © 2006-2007, Simple Machines LLC
Content © 2006-2018, Futurescale, Inc.