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: MacroCommand  (Read 8645 times)
Thomas B.
Jr. Member
**
Posts: 10


View Profile Email
« on: February 19, 2008, 04:54:17 »

Hi,

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 ?

Exemple :

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...

Mo&Th
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



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

-=Cliff>
Logged
Thomas B.
Jr. Member
**
Posts: 10


View Profile Email
« Reply #2 on: February 20, 2008, 02:59:30 »

Ok ok...

Thank you very mych.
Logged
Pages: [1]
Print