On 12/5/06, stevehousefl <[EMAIL PROTECTED]> wrote:
> I have a command that I would like to have pull lookup data from 6
> different BusinessDelegates.  Should that one command call all 6
> delegates or should it fire 6 new events that call 6 new commands?
>
> If the one command should call all 6 delegates in its execute
> function, how do you handle 6 different results since there is only 1
> onResult function.
>

The command should fire six new events for the reason you specified.
The result of each lookup should go into a class in your model. When
all the results are done, the class in the model then calculates the
final result. The class has fields for all the intermediate results,
and every time that a new result is recieved, the class checks  to see
if all the results are there. If they are,  it calculates the new
public result. Note that the intermediate results should not be
public, and should be set using a setter or by function in order to
maximize encapsulation.

Of course this is just one way to do it, but I think it is at least
and example of a clean way to handle something like this.

Regards,
Hank

> I am using Cairngorm 2.1.
>
> Thanks in advance,
>
> Steve
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>

Reply via email to