Le 24 nov. 05, à 20:27, Ian Thomas a écrit :
Why not just pass each module a callback function to call when it's
done?
Then TestSequence can do all the work.
For example:
class TestModule
{
public function runTest(callback:Function)
{
// Do some testing...
// When done...
cal
st
Cc:
Subject: Re: [Flashcoders] [structure] Automatic callback
Le 24 nov. 05, à 19:39, Scott Hyndman a écrit :
> 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.
>
>
Why not just pass each module a callback function to call when it's done?
Then TestSequence can do all the work.
For example:
class TestModule
{
public function runTest(callback:Function)
{
// Do some testing...
// When done...
callback();
}
}
class TestSequence
{
private var
and have TestSequence observing the modules.
I don't like to use an observing scheme since I must validate a
sequence of tests.
Observer make a 1 to many relation but asynchronisaly (…!)
BTW it was a good point. Thanks.
---
erixtekila
http://blog.v-i-a.net/
__
Le 24 nov. 05, à 19:39, Scott Hyndman a écrit :
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 TestSequenc
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 sen
6 matches
Mail list logo