Re: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread erixtekila
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

RE: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread Scott Hyndman
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. > >

Re: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread Ian Thomas
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

Re: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread erixtekila
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/ __

Re: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread erixtekila
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

RE: [Flashcoders] [structure] Automatic callback

2005-11-24 Thread Scott Hyndman
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