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: Executing Command Class based on Conditions  (Read 7883 times)
manoharbabu.kollipara
Jr. Member
**
Posts: 10


View Profile Email
« on: May 26, 2009, 11:46:05 »

Hi Cliff,

Is there is any Way to execute a set of command class or skip a set of command classes based on any conditions . I am already that command classs are registered to the Facade at the startup only.

Thanks & Regards,
Manohar.Kollipara
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: May 27, 2009, 06:22:58 »

Commands can be registered or unregistered at any time, not just at startup. You can register or unregister them when the conditions become appropriate.

Or you can trigger a 'guard' command that makes an evaluation and conditionally sends a notification that triggers a simple or macro command. For that matter, a mediator or proxy can make the decision about whether to send the notification or not if it has the info needed. Or the command itself can evaluate conditions and exit if conditions aren't met.

So you can do the conditional evaluation anywhere you choose, really.

-=Cliff>
Logged
Pages: [1]
Print