You could have modules aware of their peers (like a graph or linked list 
structure) and eliminate TestSequence entirely...but it would be kind of odd.

Otherwise you could have modules dispatch a notification when complete, and 
have TestSequence observing the modules. This would make the most sense...and I 
wouldn't consider it an explicit callback, since the modules will have no 
knowledge of the sequence's existence.

Scott

-----Original Message-----
From:   [EMAIL PROTECTED] on behalf of erixtekila
Sent:   Thu 11/24/2005 12:33 PM
To:     Flashcoders mailing list
Cc:     
Subject:        [Flashcoders] [structure] Automatic callback
Hi all,


I need an advice.

How could one create a structure that permit to automatically call a 
method based on the result of a process ?

Imagine that example :
I have a TestSequence which is a container of TestModules
Each TestModule has his special way to test a certain behavior.
There are black boxes of tests implementations.

I just want to batch sequentially each TestModule, and to get a 
callback called on TestSequence whenever the test is done.
Each one after the preceding : like a FIFO.

Is it possible to create this structure without calling explicitely 
TestSequence ?
I thought of Object.watch… but there must be other (design) pattern ?


Thanks for your help.
-----------
erixtekila
http://blog.v-i-a.net/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to